Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for EnsembleMetrics with MPI #51

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1eed1f8
Adding ensemble metrics to sidebars.
vmullig Feb 8, 2022
9156829
Updating main RosettaScripts page.
vmullig Feb 8, 2022
35cb717
Adding page for CentralTendency metric.
vmullig Feb 8, 2022
cc023e6
Updating auto-generated docs.
vmullig Feb 8, 2022
a18aca6
Adding auto-generated ensemble metric docs.
vmullig Feb 8, 2022
3e8cc7f
Updating CentralTendency ensemble metric doc.
vmullig Feb 8, 2022
0e5918f
Working on documentation for EnsembleMetrics.
vmullig Feb 10, 2022
b3730e1
Fleshing out EnsembleMetric documentation.
vmullig Feb 10, 2022
97d7892
Updating auto-generated docs.
vmullig Feb 10, 2022
ca9eebd
Adding note about accessing named values.
vmullig Feb 10, 2022
bbfdb09
Adding note about filtering.
vmullig Feb 10, 2022
9dd6e89
Revising text slightly.
vmullig Feb 10, 2022
9629b4b
Adding note about MPI mode.
vmullig Feb 10, 2022
3301900
Adding example of internal generation mode.
vmullig Feb 10, 2022
a5778bb
Adding note about multithreading.
vmullig Feb 10, 2022
a045962
Updating note about multi-threading.
vmullig Feb 11, 2022
eb93e85
Adding example for mode 3.
vmullig Feb 11, 2022
62a9158
Add EnsembleFilter docs to filter list.
vmullig Feb 11, 2022
d38608f
Moving some filters that were in the wrong folder.
vmullig Feb 11, 2022
11215f2
Adding documentation for EnsembleFilter.
vmullig Feb 11, 2022
b7e9ef7
Minor typos.
vmullig Feb 11, 2022
fc6e674
Expanding note about mode.
vmullig Feb 11, 2022
08dc81e
Minor tweak.
vmullig Feb 11, 2022
0b2cc38
Merge remote-tracking branch 'origin/master' into vmullig/ensemble_me…
vmullig Feb 25, 2022
af0cded
Updating note about MPI.
vmullig Feb 25, 2022
41dacf1
Updating CentralTendency and FragmentScore auto-generated docs.
vmullig Feb 25, 2022
faa5e70
Merge branch 'vmullig/ensemble_metric_doc' into vmullig/ensemble_metr…
vmullig Feb 25, 2022
22503cc
Merge remote-tracking branch 'origin/master' into vmullig/ensemble_me…
vmullig Mar 11, 2022
99146f7
Updating auto-generated docs.
vmullig Mar 11, 2022
e23b820
Merge branch 'vmullig/ensemble_metric_doc' into vmullig/ensemble_metr…
vmullig Mar 11, 2022
af0a491
Merge remote-tracking branch 'origin/master' into vmullig/ensemble_me…
vmullig Apr 18, 2022
4fa4729
Update documentation with mention of support in MPIFileBufJobDistribu…
vmullig Apr 18, 2022
2549d1b
Merge remote-tracking branch 'origin/master' into vmullig/ensemble_me…
vmullig Apr 27, 2022
bfe5514
Merge branch 'vmullig/ensemble_metric_doc' into vmullig/ensemble_metr…
vmullig Apr 27, 2022
f2cbac0
Merge remote-tracking branch 'origin/master' into vmullig/ensemble_me…
vmullig Jul 2, 2022
9c8700e
Merge branch 'vmullig/ensemble_metric_doc' into vmullig/ensemble_metr…
vmullig Jul 2, 2022
802ce09
Merge remote-tracking branch 'origin/master' into vmullig/ensemble_me…
vmullig Oct 11, 2022
1aed331
Merge branch 'vmullig/ensemble_metric_doc' into vmullig/ensemble_metr…
vmullig Oct 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding example of internal generation mode.
  • Loading branch information
vmullig committed Feb 10, 2022
commit 33019004e61376e3a11572706b34140d5b178fa6
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ Multiple pose mover mode | Set to use input from a mover that produces many outp

### Example of basic usage

In this example, the input is a cyclic peptide. This script perturbs the peptide backbone, relaxes the peptide, and then applies a [[CentralTendency EnsembleMetric|CentralTendency]] that in turn applies a [[TotalEnergyMetric]], measuring total score. At the end of execution (after repeat execution, a number of times set with the `-nstruct` flag), the EnsembleMetric produces a report about the mean, median, mode, etc. of the samples.
In this example, the input is a cyclic peptide (provided with the `-in:file:s` commandline option). This script perturbs the peptide backbone, relaxes the peptide, and then applies a [[CentralTendency EnsembleMetric|CentralTendency]] that in turn applies a [[TotalEnergyMetric]], measuring total score. At the end of execution (after repeat execution, a number of times set with the `-nstruct` commandline option), the EnsembleMetric produces a report about the mean, median, mode, etc. of the samples.

```xml
<ROSETTASCRIPTS>
@@ -38,7 +38,9 @@ In this example, the input is a cyclic peptide. This script perturbs the peptid
<MOVERS>
<!-- The following movers set up, perturb, and relax a cyclic peptide: -->
<DeclareBond name="connect_termini" res1="8" res2="1" atom1="C" atom2="N" add_termini="true" />
<GeneralizedKIC name="perturb1" selector_scorefunction="r15" closure_attempts="200" stop_when_n_solutions_found="1" selector="lowest_rmsd_selector" >
<GeneralizedKIC name="perturb1" selector_scorefunction="r15" closure_attempts="200"
stop_when_n_solutions_found="1" selector="lowest_rmsd_selector"
>
<AddResidue res_index="3"/>
<AddResidue res_index="4"/>
<AddResidue res_index="5"/>
@@ -59,7 +61,9 @@ In this example, the input is a cyclic peptide. This script perturbs the peptid
<AddValue value="5.0"/>
</AddPerturber>
</GeneralizedKIC>
<GeneralizedKIC name="perturb2" selector_scorefunction="r15" closure_attempts="200" stop_when_n_solutions_found="1" selector="lowest_rmsd_selector" >
<GeneralizedKIC name="perturb2" selector_scorefunction="r15" closure_attempts="200"
stop_when_n_solutions_found="1" selector="lowest_rmsd_selector"
>
<AddResidue res_index="7"/>
<AddResidue res_index="1"/>
<AddResidue res_index="2"/>
@@ -96,17 +100,123 @@ In this example, the input is a cyclic peptide. This script perturbs the peptid
<Add mover="perturb1" />
<Add mover="perturb2" />
<Add mover="frlx" />
<!-- Accumulate data with the EnsembleMetric for every replicate of the peturbation protocol: -->
<!-- Accumulate data with the EnsembleMetric for every replicate of the
peturbation protocol: -->
<Add ensemble_metrics="avg_energy" />
</PROTOCOLS>
<OUTPUT scorefxn="r15" />
<!-- The report is written on script termination, after all replicates have been performed (as set with the -nstruct flag on the commandline. -->
<!-- The report is written on script termination, after all replicates have been
performed (as set with the -nstruct flag on the commandline. -->
</ROSETTASCRIPTS>
```

### Example of internal generation mode

TODO
This example is similar to the example above, only this time, we load one or more cyclic peptides (provided with the `-in:file:s` or `-in:file:l` commandline options), generate a conformational ensemble for each peptide _in memory_, without writing all structures to disk, and perform ensemble analysis on that ensemble, filtering on the results with the [[EnsembleMetric]].

```xml
<ROSETTASCRIPTS>
<!-- Example of the CentralTendency EnsembleMetric used in internal generation mode. -->
<SCOREFXNS>
<ScoreFunction name="r15" weights="ref2015.wts" />
</SCOREFXNS>
<MOVERS>
<!-- The movers that set up, perturb, and relax a cyclic peptide are set up just as
in the previous example. Only this time, we bundle the perturbation protocol in a
ParsedProtocol: -->
<DeclareBond name="connect_termini" res1="8" res2="1" atom1="C" atom2="N" add_termini="true" />
<GeneralizedKIC name="perturb1" selector_scorefunction="r15" closure_attempts="200"
stop_when_n_solutions_found="1" selector="lowest_rmsd_selector"
>
<AddResidue res_index="3"/>
<AddResidue res_index="4"/>
<AddResidue res_index="5"/>
<AddResidue res_index="6"/>
<AddResidue res_index="7"/>
<SetPivots res1="3" atom1="CA" res2="5" atom2="CA" res3="7" atom3="CA" />
<AddPerturber effect="perturb_dihedral" >
<AddAtoms res1="3" atom1="N" res2="3" atom2="CA" />
<AddAtoms res1="3" atom1="CA" res2="3" atom2="C" />
<AddAtoms res1="4" atom1="N" res2="4" atom2="CA" />
<AddAtoms res1="4" atom1="CA" res2="4" atom2="C" />
<AddAtoms res1="5" atom1="N" res2="5" atom2="CA" />
<AddAtoms res1="5" atom1="CA" res2="5" atom2="C" />
<AddAtoms res1="6" atom1="N" res2="6" atom2="CA" />
<AddAtoms res1="6" atom1="CA" res2="6" atom2="C" />
<AddAtoms res1="7" atom1="N" res2="7" atom2="CA" />
<AddAtoms res1="7" atom1="CA" res2="7" atom2="C" />
<AddValue value="5.0"/>
</AddPerturber>
</GeneralizedKIC>
<GeneralizedKIC name="perturb2" selector_scorefunction="r15" closure_attempts="200"
stop_when_n_solutions_found="1" selector="lowest_rmsd_selector"
>
<AddResidue res_index="7"/>
<AddResidue res_index="1"/>
<AddResidue res_index="2"/>
<AddResidue res_index="3"/>
<AddResidue res_index="4"/>
<SetPivots res1="7" atom1="CA" res2="2" atom2="CA" res3="4" atom3="CA"></SetPivots>
<AddPerturber effect="perturb_dihedral" >
<AddAtoms res1="7" atom1="N" res2="7" atom2="CA" />
<AddAtoms res1="7" atom1="CA" res2="7" atom2="C" />
<AddAtoms res1="1" atom1="N" res2="1" atom2="CA" />
<AddAtoms res1="1" atom1="CA" res2="1" atom2="C" />
<AddAtoms res1="2" atom1="N" res2="2" atom2="CA" />
<AddAtoms res1="2" atom1="CA" res2="2" atom2="C" />
<AddAtoms res1="3" atom1="N" res2="3" atom2="CA" />
<AddAtoms res1="3" atom1="CA" res2="3" atom2="C" />
<AddAtoms res1="4" atom1="N" res2="4" atom2="CA" />
<AddAtoms res1="4" atom1="CA" res2="4" atom2="C" />
<AddValue value="5.0"/>
</AddPerturber>
</GeneralizedKIC>
<FastRelax name="frlx" repeats="1" scorefxn="r15" />
<!-- Bundling the perturbation steps together so that they can be passed
to the CentralTendency EnsembleMetric: -->
<ParsedProtocol name="ensemble_generating_protocol" >
<Add mover="perturb1" />
<Add mover="perturb2" />
<Add mover="frlx" />
</ParsedProtocol>
</MOVERS>
<SIMPLE_METRICS>
<!-- The SimpleMetric that will be passed to the CentralTendency EnsembleMetric: -->
<TotalEnergyMetric name="total_energy" scorefxn="r15" />
</SIMPLE_METRICS>
<ENSEMBLE_METRICS>
<!-- Setting up the EnsembleMetric, this time with both a SimpleMetric and a
ParsedProtocol for generating the ensemble from a given pose: -->
<CentralTendency name="avg_energy" n_threads="0" real_valued_metric="total_energy"
output_mode="tracer_and_file" output_filename="report.txt"
ensemble_generating_protocol="ensemble_generating_protocol"
ensemble_generating_protocol_repeats="20"
/>
</ENSEMBLE_METRICS>
<FILTERS>
<!-- Set up a filter that can discard those peptides that yield an
ensemble with energy above a cutoff threshold: -->
<EnsembleFilter name="filter_on_avg_energy" ensemble_metric="avg_energy"
named_value="mean" filter_acceptance_mode="less_than_or_equal"
threshold="4.0"
/>
</FILTERS>
<PROTOCOLS>
<!-- Set up the peptide, but don't perturb it yet: -->
<Add mover="connect_termini" />
<!-- Accumulate data with the EnsembleMetric for every replicate of the
peturbation protocol (which in this case is run by the EnsembleMetric,
generating each member of the ensemble internally, in memory, without
exporting them): -->
<Add ensemble_metrics="avg_energy" />
<!-- Abandon the jobs that produce bad ensemble properties prior to
writing the structure to disk: -->
<Add filter="filter_on_avg_energy" />
</PROTOCOLS>
<OUTPUT scorefxn="r15" />
</ROSETTASCRIPTS>

```

### Example of multiple pose mover mode