## You are here

22 posts / 0 new
#1

I am wondering how does the "constraints" actually work? What's the quantity of the f(x) in those functions? Is that a additional energy term of the full-atom energy function? Thank you very much!

Post Situation:
Wed, 2011-02-23 15:59
jiongzhang

Hi,

The constraint documentation is one of our best pieces: http://www.rosettacommons.org/manuals/archive/rosetta3.2_user_guide/cons...

Constraints are bipartite. The first part, the constraint type, defines the "x" in f(x). In other words, what quantity is being measured? Is it an angle, a distance, a torsion, something else?

The second part, the function, is the "f" in f(x). It converts the measured quantity directly into a score. You can many choices, listed in that link above. This score is then directly summed up as part of the scorefunction.

The constraints can do more complex things as needed, and constraint scores can be weighted, but as you imply, they are quite simple in implementation - it just directly adds new energy terms to the scorefunction.

Wed, 2011-02-23 18:03
smlewis

Thank you very much!
I have some additional questions: The new energy terms will be added in the form of "cst_weight*f(x)"? Does the Relax mode modifies the residues in alpha-helices?

Mon, 2011-02-28 11:02
jiongzhang

"The new energy terms will be added in the form of "cst_weight*f(x)"?"

I think you can set different weights for AtomPair, Angle, and DihedralConstraints (I'm not 100% sure). Either way, you get only one weight for all AtomPairConstraints, so it's weight*(f1(x1) + f2(x2) + ...), instead of having separate weights for each.

"Does the Relax mode modifies the residues in alpha-helices?"
Yes, for some meanings of "modify". It will not change their sequence and is unlikely to unfold them given a reasonable starting structure.

Mon, 2011-02-28 18:42
smlewis

Hi,
Then what is the proper weight of the constraints for Relax? I tested several weights (2 to 500), but it does not make big difference. And I do not think that is correct. Is there any exact description of how does the Relax mode work with constraints? I have read the Rosetta paper and the documentation, but it's still not clear to me...

Wed, 2011-03-16 13:12
jiongzhang

If you are concerned that the constraints are not being used (which is a pretty valid concern), try using deliberately corrupt constraints - use a constraint that refers to residue 100000 or something. If it doesn't crash, it isn't reading the constraints file.

The constraint weight will only matter if the constraint is NOT satisfied - a satisfied constraint has a score of zero and thus the weight is irrelevant. Are your constraints not satisfied?

It is also useful to calculate what you think the constraint score ought to be when not satisfied (after multiplying by the weight) - if it's not at least 1% compared to the rosetta total_score, then the constraint isn't strong enough to have much effect.

I'm not aware of any further documentation.

Thu, 2011-03-17 12:56
smlewis

Hi, Thank you very much! I did some further test, and I think it isn't reading the constraints file. Here is the command:./relax.linuxgccrelease -relax:fast -s 00.pdb -database \$rodir/rosetta_database -out:pdb -constraints:cst_fa_file constraints_file_name-pdb -constraints:cst_fa_weight 100 -out:nstruct 10.

Could you tell me why it doesn't read the constraints file? Or what might be the problem? Thanks!

Sun, 2011-03-20 17:44
jiongzhang

Is there a dash in your constraints file filename? Maybe the options parser is having trouble with the dash? Try changing the filename (or telling it to load a non-existent file) and see how it responds.

The only thing Relax.cc does is call a function Relax_main, and if you look at Relax_main (src/protocols/relax/relax_main.cc), the first thing it does is look for constraints.

Mon, 2011-03-21 07:28
smlewis

Hi, I changed the file name and did some further tests with crazy constraints, but it is still not crashed. It seems the constraints does not work properly. I do not know what's wrong with it. Could you help me with it? Thank you very much! Here is the out file of Relax:

core.init: Mini-Rosetta version 40222:40309M from https://svn.rosettacommons.org/source/branches/releases/rosetta-3.2/rose...
core.init: command: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_source/bin/relax.linuxgccrelease -relax:fast -s ../pdb/MUFOLD-Server-T538_5.pdb -database /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database -out:pdb -constraints:cst_fa_file constraints_file_name -constraints:cst_fa_weight 10000000000000000 -out:nstruct 1 -out:prefix w
core.init: 'RNG device' seed mode, using '/dev/urandom', seed=-1506506741 seed_offset=0 real_seed=-1506506741
core.init.random: RandomGenerator:init: Normal mode, seed=-1506506741 RG_type=mt19937
core.scoring.ScoreFunctionFactory: SCOREFUNCTION: standard
core.scoring.ScoreFunctionFactory: SCOREFUNCTION PATCH: score12
core.scoring.etable: Starting energy table calculation
core.scoring.etable: smooth_etable: changing atr/rep split to bottom of energy well
core.scoring.etable: smooth_etable: spline smoothing lj etables (maxdis = 6)
core.scoring.etable: smooth_etable: spline smoothing solvation etables (max_dis = 6)
core.scoring.etable: Finished calculating energy tables.
core.io.database: Database file opened: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database/pdb_pair_stats_fine
core.io.database: Database file opened: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database/scoring/score_functions/hbonds/standard_params/HBPoly1D.csv
core.io.database: Database file opened: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database/scoring/score_functions/hbonds/standard_params/HBEval.csv
core.io.database: Database file opened: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database/P_AA
core.io.database: Database file opened: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database/P_AA_n
core.io.database: Database file opened: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database/P_AA_pp
core.io.database: Database file opened: /home/jiozhang/data/NIH/rosetta-3.2/rosetta_database/Rama_smooth_dyn.dat_ss_6.4
protocols.relax.FastRelax: ================== Using default script ==================
core.scoring.constraints: Constraint choice: constraints_file_name
protocols.jd2.PDBJobInputter: Instantiate PDBJobInputter
protocols.jd2.PDBJobInputter: PDBJobInputter::fill_jobs
protocols.jd2.PDBJobInputter: pushing ../pdb/MUFOLD-Server-T538_5.pdb nstruct index 1
protocols.jd2.PDBJobInputter: PDBJobInputter::pose_from_job
core.conformation.Conformation: [ WARNING ] missing heavyatom: OXT on residue GLN_p:CtermProteinFull 54
protocols.jd2.PDBJobInputter: filling pose from PDB ../pdb/MUFOLD-Server-T538_5.pdb
core.scoring.dunbrack: Dunbrack library took 0.05 seconds to load from binary
protocols.relax.FastRelax: CMD: repeat 182.434 0 0 0.44
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 624 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 464776 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -137.033 0.603466 0.603466 0.0088
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 578 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 436976 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -119.638 0.747985 0.747985 0.11
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 547 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 380172 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -109.236 0.67832 0.67832 0.242
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 549 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 371716 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -105.561 0.87336 0.87336 0.44
protocols.relax.FastRelax: MRP: 0 -105.561 -105.561 0.87336 0.87336
protocols.relax.FastRelax: CMD: accept_to_best -105.561 0.87336 0.87336 0.44
protocols.relax.FastRelax: CMD: endrepeat -105.561 0.87336 0.87336 0.44
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 651 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 511620 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -155.431 1.06552 1.06552 0.0088
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 567 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 416428 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -127.201 0.881735 0.881735 0.11
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 567 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 410624 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -116.007 0.876866 0.876866 0.242
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 538 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 371416 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -106.84 0.906903 0.906903 0.44
protocols.relax.FastRelax: MRP: 1 -106.84 -106.84 0.906903 0.906903
protocols.relax.FastRelax: CMD: accept_to_best -106.84 0.906903 0.906903 0.44
protocols.relax.FastRelax: CMD: endrepeat -106.84 0.906903 0.906903 0.44
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 655 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 520124 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -155.291 1.1129 1.1129 0.0088
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 559 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 411652 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -130.452 0.97148 0.97148 0.11
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 557 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 398768 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -118.217 0.931387 0.931387 0.242
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 549 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 383092 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -107.743 1.04338 1.04338 0.44
protocols.relax.FastRelax: MRP: 2 -107.743 -107.743 1.04338 1.04338
protocols.relax.FastRelax: CMD: accept_to_best -107.743 1.04338 1.04338 0.44
protocols.relax.FastRelax: CMD: endrepeat -107.743 1.04338 1.04338 0.44
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 663 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 555524 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -152.422 1.1464 1.1464 0.0088
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 557 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 411004 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -131.224 1.03518 1.03518 0.11
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 561 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 405632 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -119.508 1.03768 1.03768 0.242
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 545 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 386024 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -108.762 1.0265 1.0265 0.44
protocols.relax.FastRelax: MRP: 3 -108.762 -108.762 1.0265 1.0265
protocols.relax.FastRelax: CMD: accept_to_best -108.762 1.0265 1.0265 0.44
protocols.relax.FastRelax: CMD: endrepeat -108.762 1.0265 1.0265 0.44
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 662 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 544532 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -148.207 1.13287 1.13287 0.0088
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 574 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 415580 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -130.085 1.02975 1.02975 0.11
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 561 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 388612 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -120.47 1.00552 1.00552 0.242
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 549 rotamers at 54 positions.
core.pack.pack_rotamers: IG: 375220 bytes
protocols.relax.FastRelax: CMD: ramp_repack_min -109.946 1.03374 1.03374 0.44
protocols.relax.FastRelax: MRP: 4 -109.946 -109.946 1.03374 1.03374
protocols.relax.FastRelax: CMD: accept_to_best -109.946 1.03374 1.03374 0.44
protocols.relax.FastRelax: CMD: endrepeat -109.946 1.03374 1.03374 0.44
protocols::checkpoint: Deleting checkpoints of FastRelax
protocols.jd2.JobDistributor: wMUFOLD-Server-T538_5_0001 reported success in 13 seconds
protocols.jd2.JobDistributor: no more batches to process...
protocols.jd2.JobDistributor: 1 jobs considered, 1 jobs attempted in 13 seconds
protocols::checkpoint: Deleting checkpoints of FastRelax

Mon, 2011-03-21 14:43
jiongzhang

If this works, tell me, and I'll fix it in trunk.

It looks like RELAX wants you to use cst_fa_file and cst_fa_weight, but it relies on a different piece of code that uses cst_file and cst_weight. Try offering the same arguments to both cst_fa_file and cst_file; and cst_fa_weight and cst_weight.

If that doesn't work, then probably constraints never worked right with relax, and I'll contact the person who wrote it and ask how it was supposed to work.

Tue, 2011-03-22 09:34
smlewis

when use cst_file and cst_weight, it doesn't read the constraints file( no core.scoring.constraints ... in out file). And all the results are comparable to free relax.

Tue, 2011-03-22 10:45
jiongzhang

I'm not sure I was clear enough. Try this:

relax.linuxgccrelease -cst_fa_file MY_FILE -cst_file MY_FILE -cst_fa_weight 100 -cst_weight 100

See if using both flags at once helps.

Tue, 2011-03-22 10:49
smlewis

It seems that constraints works in this case. However, it does not crash the structure, but keep it unchanged under crazy constraints. I do not understand why is that. Here is part of my constraints file:

AtomPair CA 1 CA 2 HARMONIC 10000 0.1
AtomPair CA 1 CA 3 HARMONIC 10000 0.1
AtomPair CA 1 CA 4 HARMONIC 10000 0.1
AtomPair CA 1 CA 5 HARMONIC 10000 0.1
AtomPair CA 1 CA 6 HARMONIC 10000 0.1
AtomPair CA 1 CA 7 HARMONIC 10000 0.1
AtomPair CA 1 CA 8 HARMONIC 10000 0.1
AtomPair CA 1 CA 9 HARMONIC 10000 0.1
AtomPair CA 1 CA 10 HARMONIC 10000 0.1
AtomPair CA 1 CA 11 HARMONIC 10000 0.1
AtomPair CA 1 CA 12 HARMONIC 10000 0.1
AtomPair CA 1 CA 13 HARMONIC 10000 0.1
AtomPair CA 1 CA 14 HARMONIC 10000 0.1
AtomPair CA 1 CA 15 HARMONIC 10000 0.1
AtomPair CA 1 CA 16 HARMONIC 10000 0.1
AtomPair CA 1 CA 17 HARMONIC 10000 0.1
AtomPair CA 1 CA 18 HARMONIC 10000 0.1
AtomPair CA 1 CA 19 HARMONIC 10000 0.1
...

Tue, 2011-03-22 14:00
jiongzhang

I sent this along to someone who uses relax more than I do and they couldn't duplicate it. I don't know what else to do to help...

Mon, 2011-03-28 08:07
smlewis

With both cst_fa_file and cst_file; and cst_fa_weight and cst_weight, it works for my case now. Thank you very much!

Tue, 2011-03-29 09:15
jiongzhang

Hello everyone,

I also try out to bulit in constraints into rosetta. I see in the output, that rosetta read the constraint. But I am interest in, how well rosetta satisfy this constraints and how this constraints influence the total-score of the structures. Where can I found information about that in the output?! Or it there any spezial command, that I can use to become this information?! I use -constraints:cst_weight 1.0, it this a high or low weight?! I hope somebody can help me.

Thu, 2014-12-11 05:32
masterofpuppets

If you have the constraint weight on in the final output structure, it should output the constraint scores in the final structure. If you output PDBs, in addition to the total constraint score, you should be able to see a residue-by-residue listing of the constraint scores, which should allow you to see how severely the constraints are being violated.

It's hard to say if a constraint weight is high or low, as it depends on the functional form you choose, what degree of freedom you're constraining, and what other interactions you're trying to balance against in applying the constraint. A value of 1.0 is a good starting choice - most of the recommended settings are set up to use a constraint value set somewhere in that range. You may need to adjust it later, depending on how well your output structures match the constraints. Do a few test runs to see. It's normally better to start low and increase constraint weights than to put on a too-high value from the start -- mainly because it's easy to see when you need to increase the constraint weight (your constraints aren't satisfied), but it's harder to see when you've needlessly over-constrainted the system.

Mon, 2014-12-15 02:22
rmoretti

Thank you very much.

I dont find any constraint scores in my output file.
My command file is:
/users/stud09/crietze/rosetta_2014.20.56838_bundle/main/source/bin/AbinitioRelax.linuxgccrelease \
-database /users/stud09/crietze/rosetta_2014.20.56838_bundle/main/database \
-in:file:fasta ./input/pax.fasta \
-in:file:frag3 ./input/aat000_03_05.200_v1_3 \
-in:file:frag9 ./input/aat000_09_05.200_v1_3 \
-constraints:cst_fa_file ./input/NOE.centroid.cst \
-constraints:cst_fa_weight 1.0 \
-abinitio:relax \
-abinitio::increase_cycles 10 \
-abinitio::rg_reweight 0.5 \
-abinitio::rsd_wt_helix 0.5 \
-abinitio::rsd_wt_loop 0.5 \
-relax::fast \
-nstruct 1 \
-out:file:silent ./output/pax_silent.out \
-out:path ./output/ \
-out:pdb \
-out:output

The NOE.centroid.cst file have 152 constraints, which begins with:
AmbiguousNMRDistance H 47 HD2 19 BOUNDED 1.5 5.650 0.3 NOE; rawdata 5.500
...
Only in the score.fsc file there is a value for atom_pair_constraint, but nothing more. In which file should I find the separate NOEs contraint scores?! I dont know what should wrong.

If I built in zinc coordination in the structure my command file is:
/users/stud09/crietze/rosetta_2014.20.56838_bundle/main/source/bin/AbinitioRelax.linuxgccrelease \
-database /users/stud09/crietze/rosetta_2014.20.56838_bundle/main/database \
-abinitio:relax \
-relax:quick \
-relax:jump_move \
-increase_cycles 0.1 \
-run:test_cycles \
-score:weights talaris2013 \
-abinitio:rg_reweight 0.5 \
-abinitio:rsd_wt_helix 0.5 \
-abinitio:rsd_wt_loop 0.5 \
-abinitio:use_filters false \
-fold_cst:no_minimize \
-jumps:residue_pair_jump_file ./input/pax.residue_pair_jump_cst \
-packing:ex1 \
-packing:ex1:level 1 \
-packing:ex2 \
-packing:ex2:level 1 \
-packing:extrachi_cutoff 0 \
-in:file:fasta ./input/pax.fasta \
-psipred_ss2 ./input/pax.psipred_ss2 \
-in:file:frag9 ./input/aat000_09_05.200_v1_3 \
-in:file:frag3 ./input/aat000_03_05.200_v1_3 \
-constraints:cst_weight 1.0 \
-constraints:cst_fa_file ./input/pax.tetraL.fa_cst \
-constraints:cst_fa_weight 1.0 \
-abinitio:relax \
-out:nstruct 10 \
-out:path:pdb \
-out:pdb \
-out:output \
-out:file:output_virtual \
-out:file:silent pax.out

it is right, that i built in the NOEs in the pax.tetraL.fa_cst file and call the NOEs AmbiguousNMRDistance?! Or is this the wrong way?!

Fri, 2014-12-19 07:14
masterofpuppets

Instead of using "-score:weights talaris2013" (which doesn't have constraints turned on by default), try using "-score:weights talaris2013_cst". If you have the constraints specified in the ./input/pax.tetraL.fa_cst file, it should be present in the full atom output.

That said, the AmbiguousNMRDistance constraint should show up in the atom_pair_constraint column, if you have it in the output file. Are you getting full atom output with sidechains, or are you getting centroid mode output with CEN atoms? Are there fa_* terms in the scoring output you do see?

Mon, 2015-02-09 11:08
rmoretti

Thank you. I will try out the -score:weights talaris2013_cst.

I use the full-atom-calculation, but in the output I only find, that the 152 NOEs are read in and nothing more. I dont see any fa_terms in the output file, the only one I can use is the atom_pair_constraint in the scoring file.

Tue, 2015-02-10 03:38
masterofpuppets

sorry, I mean I see the fa_terms, but nothing special like how well the noes are fullfilled.

Tue, 2015-02-10 07:11
masterofpuppets

If you see fa_* terms, you're scoring the structure with a full atom scorefunction. There won't be any specific mention about individual NOE satisfaction in the score file - all the NOE's will be rolled into the single atom_pair_constraint scoreterm. There may be information about the individual NOEs written to the tracer, but that might be protocol dependent.

Wed, 2015-02-18 09:23
rmoretti