You are here

DomainAssembly Mover with constraints (using RosettaScripts)

4 posts / 0 new
Last post
DomainAssembly Mover with constraints (using RosettaScripts)
#1

Hello,

I am trying to run the domain assembly protocol while atom_pair constraints . I am using RosettaScripts for my application.

I have tried including the constraint file in the xml script using the ConstraintSetMover and Reweighting the score function. I have also tried included the constraint file in the flag file using -constraint:cst_fname. Yet the output silent do not seem to include the atom_constraints score term.

I would appreciate any help on how to include the constraints in the scoring function for domain assembly.

Here is the flag file

-no_filters
-mute core.util.prof
-out:overwrite
-out:prefix domAss
-out:suffix 1
-out:file:silent D1D2A_silent_linker.out
-out:file:scorefile domAssD1D2A.fasc
-out:file:fullatom
-mute core.io.database
-seed_offset 1
-nstruct 1
-ex1
-ex2aro
-out::path mecpA_D1_0_mecpA_D2_0
-in::path::database /scratch/tim/software/rosetta_git/main/database/
-s D1D2A_doms.pdb
-parser:protocol domain_assembly.xml
-restore_pre_talaris_2013_behavior
-constraints:cst_file protein_d1_d2_xl.cst
-constraints:cst_fa_file protein_d1_d2_xl.cst

And the XML file:

<ROSETTASCRIPTS>
	<SCOREFXNS>
	<SFXN1 weights=pre_talaris_2013_standard>
	<Reweight scoretype=atom_pair_constraint weight=1.0/>
	</SFXN1>
	</SCOREFXNS>
	<TASKOPERATIONS>
	  <InitializeFromCommandline name=ifcl/>
	  <RestrictToRepacking name=rtr />
	  <RestrictToInterfaceVector name=rtiv chain1_num=1 chain2_num=2 CB_dist_cutoff=10.0 nearby_atom_cutoff=5.5 vector_angle_cutoff=75 vector_dist_cutoff=9.0 />
	</TASKOPERATIONS>
	<FILTERS>
	</FILTERS>
	<MOVERS>
		<DomainAssembly name=dom_ass linker_start_res_num="66" linker_end_res_num="85" frag3="D1D2A.200.3mers" frag9="D1D2A.200.9mers"/>
		<FastRelax name=fastrlx repeats=8 scorefxn=score12 />
		<ConstraintSetMover name=csts cst_file="protein_d1_d2_xl.cst"/>
		MINIMIZATION MOVERS
		These movers are part of the minimization protocol put together in the minimize_iface ParsedProtocol
		<PackRotamersMover name=soft_rp scorefxn=soft_rep task_operations=rtiv,rtr,ifcl />
		<PackRotamersMover name=rp scorefxn=score12 task_operations=rtiv,rtr,ifcl />
		
		<TaskAwareMinMover name=soft_min tolerance=0.001 task_operations=ifcl,rtiv type=dfpmin_armijo_nonmonotone chi=1 bb=1 jump=1 scorefxn=soft_rep />
		<TaskAwareMinMover name=soft_min_sc tolerance=0.001 task_operations=ifcl,rtiv type=dfpmin_armijo_nonmonotone chi=1 bb=0 jump=0 scorefxn=soft_rep />
		<TaskAwareMinMover name=min_sc tolerance=0.0001 task_operations=ifcl,rtiv type=dfpmin_armijo_nonmonotone chi=1 bb=0 jump=0 scorefxn=score12 />
		<TaskAwareMinMover name=min tolerance=0.0001 task_operations=ifcl,rtiv type=dfpmin_armijo_nonmonotone chi=1 bb=1 jump=1 scorefxn=score12 />
		
		This minimization protocol is adapted from Whitehead, Fleishman, ... , Baker. See the XML scripts available in the Supp Mat.
		<ParsedProtocol name=minimize_interface mode=sequence>
			<Add mover=soft_rp />
			<Add mover=soft_min_sc />
			<Add mover=soft_rp />
			<Add mover=soft_min />
			<Add mover=soft_rp />
			<Add mover=min_sc />
			<Add mover=soft_rp />
			<Add mover=min />
			<Add mover=rp />
			<Add mover=min_sc />
			<Add mover=rp />
			<Add mover=min />
		</ParsedProtocol>
	</MOVERS>
	<APPLY_TO_POSE>
	</APPLY_TO_POSE>
	<PROTOCOLS>
		<Add mover=csts/>
		<Add mover=dom_ass/>
		<Add mover=fastrlx/>
	</PROTOCOLS>
</ROSETTASCRIPTS>

A sample of my constraint file:

AtomPair CB  72 CB  110 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  30 CB  160 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  40 CA  161 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  40 CB  160 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  30 CA  118 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  73 CB  110 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CA  41 CB  147 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  75 CB  148 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  75 CB  144 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  70 CB  111 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  43 CB  110 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CA  69 CB  77 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  73 CB  108 BOUNDED  0.0 8.0 2.0 NOE
AtomPair CB  30 CB  149 BOUNDED  0.0 8.0 2.0 NOE

In the the program output, the constraints seem to be loaded. Yet not taken into account while running the assembly protocol:

protocols.rosetta_scripts.ParsedProtocol: =======================BEGIN MOVER ConstraintSetMover - csts=======================
{
core.io.constraints: read constraints from /scratch/mahmoud/crosslinking/data/experiments/mecp2/constraints/mecp2_d1_d2_xl.cst
core.io.constraints: Read in 131 constraints
protocols.rosetta_scripts.ParsedProtocol: 
}
=======================END MOVER ConstraintSetMover - csts=======================
protocols.rosetta_scripts.ParsedProtocol: =======================BEGIN FILTER =======================
{
protocols.rosetta_scripts.ParsedProtocol: 
}
=======================END FILTER =======================
protocols.rosetta_scripts.ParsedProtocol: =======================BEGIN MOVER DomainAssembly - dom_ass=======================
{
core.scoring.ScoreFunctionFactory: SCOREFUNCTION: talaris2013
core.chemical.ResidueTypeSet: Finished initializing centroid residue type set.  Created 1980 residue types
basic.io.database: Database file opened: scoring/score_functions/SecondaryStructurePotential/phi.theta.36.HS.resmooth
basic.io.database: Database file opened: scoring/score_functions/SecondaryStructurePotential/phi.theta.36.SS.resmooth
basic.io.database: Database file opened: scoring/score_functions/centroid_smooth/cen_rot_pair_params.txt
basic.io.database: Database file opened: scoring/score_functions/centroid_smooth/cen_rot_env_params.txt
basic.io.database: Database file opened: scoring/score_functions/centroid_smooth/cen_rot_pair_ang_params.txt
core.scoring: ATOM_VDW set to CENTROID_ROT
core.scoring: ATOM_VDW set to CENTROID_ROT
protocols.abinitio: 
===================================================================
   Stage 1                                                         
   Folding with score0 for max of 2000
protocols.abinitio: Replaced extended chain after 1 cycles.
protocols.moves.TrialCounter: ClassicFragmentM trials=      1;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.abinitio: ------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 vdw                          0.100     246.987      24.699
---------------------------------------------------
 Total weighted score:                       24.699

===================================================================
   Stage 2                                                         
   Folding with score1 for 2000
protocols.moves.TrialCounter: ClassicFragmentM trials=   2000;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.abinitio: ------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 vdw                          1.000     246.987     246.987
 pair                         1.000     -63.938     -63.938
 env                          1.000      -8.721      -8.721
 hs_pair                      1.000       0.000       0.000
 ss_pair                      0.300       0.000       0.000
 sheet                        1.000       0.000       0.000
---------------------------------------------------
 Total weighted score:                      174.328

===================================================================
   Stage 4                                                         
   Folding with score3 for 4000
protocols.moves.TrialCounter: ClassicFragmentM trials=   4000;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.moves.TrialCounter: SmoothFragmentMo trials=   8000;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.abinitio: ------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 vdw                          1.000     246.987     246.987
 cenpack                      1.000       4.726       4.726
 pair                         1.000     -63.938     -63.938
 env                          1.000      -8.721      -8.721
 cbeta                        1.000      63.244      63.244
 rg                           3.000      16.111      48.333
 hs_pair                      1.000       0.000       0.000
 ss_pair                      1.000       0.000       0.000
 rsigma                       1.000       0.000       0.000
 sheet                        1.000       0.000       0.000
---------------------------------------------------
 Total weighted score:                      290.630

===================================================================
   Finished Abinitio                                                 

 

Thanks for the help!

 

Yours,
Mahmoud

Post Situation: 
Wed, 2016-09-21 11:19
resiros

There's probably two things going on here. First off, regarding not getting the score in the output silent file, by default RosettaScripts re-scores the output structures with the commandline scorefunction. If you don't set the scorefunction explicitly, you'll get the default scorefunction, which typically will not have any of the constraint terms turned on. So what you'll want to do is either set the output weights on the commandline, or use the OUTPUT tag of RosettaScripts to specify a in-XML scorefunction for final scoring.

You're also going to want to specify the scorefunction on the commandline anyway, as the DomainAssembly mover doesn't take a scorefunction parameter, and is using the commandline full atom scorefunction. This is pulling up talaris2013 (!) despite the fact that you've specified the -restore_pre_talaris_2013_behavior flag. (Is there a particular reason you're switching back to pre-talaris2013?)

The other thing that's going on is that the DomainAssembly mover is invoking the ab initio protocol, which is going through a low-resolution centroid stage. This needs various centroid-mode scorefunctions, which are read directly from the database, and not from the XML tag. What I'd try doing is specifying '- cst_weight' and '-cst_fa_weight' on the commandline. (Passing a parameter of 1.0 should probably be fine, but you can try increasing it if you're getting structures which aren't following the constraints.)

Fri, 2016-10-14 15:36
rmoretti

Hello rmoretti,

Many thanks for you answer!
I tried adding the OUTPUT tag, and did indeed get the atom_pair_constraint score term in my output scores.
I tried adding  -cst_weight and -cst_fa_weight to the flag file . This did not change the output of ab initio, i.e. no atom_pair_constraint term was in the outputs (see outputs below). Is this normal?
I have also tried using a very high weights '-cst_weight 100.0', just to see if this has an effect on the atom_pair_constraint term in my final structure (I use the weight 1.0 with the OUTPUT tag for final scoring) . The value of the atom_pair_constraint term does not change, so it seems that the constraint energy term is not taken into account in ab initio.

Do you have an idea on what I can do next?

Thanks again for your help!

Yours, 
Mahmoud

protocols.rosetta_scripts.ParsedProtocol: =======================BEGIN MOVER DomainAssembly - dom_ass=======================
{
core.scoring.ScoreFunctionFactory: SCOREFUNCTION: talaris2013
core.chemical.ResidueTypeSet: Finished initializing centroid residue type set.  Created 1980 residue types
basic.io.database: Database file opened: scoring/score_functions/SecondaryStructurePotential/phi.theta.36.HS.resmooth
basic.io.database: Database file opened: scoring/score_functions/SecondaryStructurePotential/phi.theta.36.SS.resmooth
basic.io.database: Database file opened: scoring/score_functions/centroid_smooth/cen_rot_pair_params.txt
basic.io.database: Database file opened: scoring/score_functions/centroid_smooth/cen_rot_env_params.txt
basic.io.database: Database file opened: scoring/score_functions/centroid_smooth/cen_rot_pair_ang_params.txt
core.scoring: ATOM_VDW set to CENTROID_ROT
core.scoring: ATOM_VDW set to CENTROID_ROT
protocols.abinitio: 
===================================================================
   Stage 1                                                         
   Folding with score0 for max of 2000
protocols.abinitio: Replaced extended chain after 1 cycles.
protocols.moves.TrialCounter: ClassicFragmentM trials=      1;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.abinitio: ------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 vdw                          0.100     246.987      24.699
---------------------------------------------------
 Total weighted score:                       24.699

===================================================================
   Stage 2                                                         
   Folding with score1 for 2000
protocols.moves.TrialCounter: ClassicFragmentM trials=   2000;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.abinitio: ------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 vdw                          1.000     246.987     246.987
 pair                         1.000     -63.938     -63.938
 env                          1.000      -8.721      -8.721
 hs_pair                      1.000       0.000       0.000
 ss_pair                      0.300       0.000       0.000
 sheet                        1.000       0.000       0.000
---------------------------------------------------
 Total weighted score:                      174.328

===================================================================
   Stage 3                                                         
   Folding with score2 and score5 for 2000
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.abinitio:  stop cycles in stage3 due to convergence 
protocols.moves.TrialCounter: ClassicFragmentM trials=     99;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.abinitio: ------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 vdw                          1.000     246.987     246.987
 cenpack                      0.500       4.726       2.363
 pair                         1.000     -63.938     -63.938
 env                          1.000      -8.721      -8.721
 cbeta                        0.250      63.244      15.811
 hs_pair                      1.000       0.000       0.000
 ss_pair                      1.000       0.000       0.000
 sheet                        1.000       0.000       0.000
---------------------------------------------------
 Total weighted score:                      192.502

===================================================================
   Stage 4                                                         
   Folding with score3 for 4000
protocols.moves.TrialCounter: ClassicFragmentM trials=   4000;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.moves.TrialCounter: SmoothFragmentMo trials=   8000;  accepts= 1.0000;  energy_drop/trial=   0.00000
protocols.abinitio: ------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 vdw                          1.000     246.987     246.987
 cenpack                      1.000       4.726       4.726
 pair                         1.000     -63.938     -63.938
 env                          1.000      -8.721      -8.721
 cbeta                        1.000      63.244      63.244
 rg                           3.000      16.111      48.333
 hs_pair                      1.000       0.000       0.000
 ss_pair                      1.000       0.000       0.000
 rsigma                       1.000       0.000       0.000
 sheet                        1.000       0.000       0.000
---------------------------------------------------
 Total weighted score:                      290.630

===================================================================
   Finished Abinitio                                                 

protocols::checkpoint: Deleting checkpoints of ClassicAbinitio
core.pack.task: Packer task: initialize from command line() 
core.pack.dunbrack: Dunbrack 2010 library took 0.32 seconds to load from binary
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 2078 rotamers at 100 positions.
core.pack.pack_rotamers: IG: 1927864 bytes
protocols::checkpoint: Deleting checkpoints of Abrelax
protocols.rosetta_scripts.ParsedProtocol: 
}
=======================END MOVER DomainAssembly - dom_ass=======================
Thu, 2016-10-20 04:52
resiros

Interesting, it looks like those stages skip the scorefunction loading  code I thought they would use...

It looks like the fix is to make a patch file which sets the value of the constraint term to the values you want, e.g. 

atom_pair_constraint = 5.0

And then pass it to -abinitio::stage1_patch -abinitio::stage2_patch -abinitio::stage3_patch, etc. on the commandline, depending on which stages you want the constraints to apply to.

Mon, 2016-11-14 14:21
rmoretti