Viewing 3 reply threads
  • Author
    Posts
    • #1687
      Anonymous

        Hi, I’m hoping there might be a quick way to alter the VIP code so that it reads res and cst files. This thread seems to tackle the cst file problem: https://www.rosettacommons.org/node/3268 (although I admit I haven’t tried it yet to see if it works…), but not necessarily the resfile problem. I’d essentially like for VIP to redesign with a more restricted APOLAR set, by excluding W and Y. Any ideas? Thanks!!

      • #9182
        Anonymous

          I just tried making the adjustments to the VIP code that Steven had suggested in that previous thread, but upon recompiling (with scons bin mode=release) I got the following error:

          src/protocols/vip/VIP_Mover.cc:399: error: ‘add_constraints_from_cmdline_to_scorefunction’ is not a member of ‘core::scoring::constraints’

          I’ve attached my modified VIP code. (I had to add the .txt extension in order to upload it here.) Any help is much appreciated. Thanks!

        • #9183
          Anonymous

            Following what Steven suggested (with some slight adjustments) I got VIP to actually include constraints in the energy function. BUT, VIP still doesn’t implement the constraints from the constraint file. I can see that the angle, coordinate, pair and dihedral constraints are turned on in the energy table, but the scores are zero in all these categories. What should I do to get VIP to actually use the constraints in the scoring?

            Here’s a commandline example, along with the attached options file, cst file and revised VIP_Mover.cc and vip.cc files:

            ~/rosetta/rosetta-3.5/rosetta_source/bin/vip.default.linuxgccrelease -database ~/rosetta/rosetta-3.5/rosetta_database/ @options_vip_08062013.txt

          • #9186
            Anonymous

              To get resfile behavior, try adding a ReadResfile task operation to the main_task_factory TaskFactory in src/protocols/vip/VIP_Mover.cc, line 247. Remember that task operations are restrictive, so everything forbidden by the resfile will be forbidden to VIP, but anything allowed by the resfile will go through the normal VIP selection.

              Regarding constraints, that’s a little strange. It looks like you’ve added the constraints to scorefunction, and it looks like they should be loaded into the pose. I would suggest checking that they’re loaded properly. You can print out details about the loaded constraints with pose.constraint_set()->show_definition(TR,pose). Also take a look at the tracer output around the constraint loading stage, to see if there are any warning messages (malformed files, etc.).

              Also, it may be worth just simply scoring a pose with that constraint file (or using some other protocol which takes constraints), to tell if it’s something specific to the altered VIP protocol.

            • #9187
              Anonymous

                Thanks for the response. It seems the constraints are never being loaded in. I added “pose.constraint_set()->show_definition(TR,pose);” to line 100 of VIP_Mover.cc, and recompiled, but did not see any additional output associated with this command. Should I have put it somewhere else in the code?

                I noticed in the VIP output that there is no constraint loading section, as there is during, say, Relax. So my guess is that although the weights of the constraints are turned on, VIP is not loading the constraints from the commandline option “-constraints:cst_fa_file my_atomic_07172013.cst” Do I need to add another command to the source code to get it to recognize the constraints from the cst file?

                Thanks!

              • #9191
                Anonymous

                  It looks like add_constraints_from_cmdline_to_pose() isn’t doing quite what we might expect. It’s loading from the -constraints:cst_file option only, and ignoring the -constraints:cst_fa_file option all together. It should be fine to use the -constraints:cst_file option with VIP. The two different options are there primarily to separate out the two different constraint files with protocols that use both full atom and centroid mode stages. There really isn’t any difference in the format and loading of constraints between the two, besides which atoms are available to the constraints.

                • #9194
                  Anonymous

                    I just noticed the add_fa_constraints_from_cmdline_to_pose() function, which looks at the -constraints:cst_fa_file option specifically. You may want to use that instead.

                  • #9195
                    Anonymous

                      Thanks! I changed add_constraints_from_cmdline_to_pose() to add_fa_constraints_from_cmdline_to_pose() in vip.cc and the constraints are now read in and obeyed. So the constraint part is solved.

                      Now for the resfile part, here’s what I tried around line 253 in VIP_Mover.cc, as you suggested. I had to also include this header file to get it to compile:
                      include basic/options/keys/packing.OptionKeys.gen.hh

                      core::pack::task::TaskFactoryOP main_task_factory = new core::pack::task::TaskFactory;
                      if( option[ OptionKeys::packing::resfile ].user() ) {
                      main_task_factory->push_back( new core::pack::task::operation::ReadResfile );
                      }

                      The tracer output shows no sign of loading the resfile however, when I include the option “-resfile resfile.txt”. Did I code this incorrectly?

                      Thanks again!

                    • #9196
                      Anonymous

                        No, that’s exactly what I suggested. I made a mistake in that the main_task_factory isn’t actually used for anything. (Huh?)

                        What you want to do is apply the taskfactory to the packer task. Add the line

                        main_task_factory->modify_task( pack_pose, task )

                        after the push_back if block, and before the for loop.

                    Viewing 3 reply threads
                    • You must be logged in to reply to this topic.