IMP logo
IMP Manual  for IMP version 2.8.0
rnapolii_3.md
1 Stage 3 - Sampling {#rnapolii_3}
2 ==================
3 
4 With the system representation built and data restraints entered, the system is now ready to sample configurations. A replica exchange run can be set up using the [ReplicaExchange0](@ref IMP::pmi::macros::ReplicaExchange0) macro:
5 
6 \code{.py}
7 mc1=IMP.pmi.macros.ReplicaExchange0(m,
8  representation,
9  monte_carlo_sample_objects=sampleobjects,
10  output_objects=outputobjects,
11  crosslink_restraints=[xl1,xl2],
12  monte_carlo_temperature=1.0,
13  simulated_annealing=True,
14  simulated_annealing_minimum_temperature=1.0,
15  simulated_annealing_maximum_temperature=2.5,
16  simulated_annealing_minimum_temperature_nframes=200,
17  simulated_annealing_maximum_temperature_nframes=20,
18  replica_exchange_minimum_temperature=1.0,
19  replica_exchange_maximum_temperature=2.5,
20  number_of_best_scoring_models=100,
21  monte_carlo_steps=num_mc_steps,
22  number_of_frames=num_frames,
23  global_output_directory="output")
24 \endcode
25 
26 See the [ReplicaExchange0 documentation](@ref IMP::pmi::macros::ReplicaExchange0.__init__)
27 for a full description of all of the input parameters.
28 
29 The sampling is performed by executing the macro built above:
30 
31 \code{.py}
32 mc1.execute_macro()
33 \endcode
34 
35 ### Sampling Output
36 
37 The script generates an `output` directory containing the following:
38 * `pdbs`: a directory containing the 100 best-scoring models (see the `number_of_best_scoring_models` variable above) from the run, in PDB format.
39 * `rmfs`: a single [RMF file](https://integrativemodeling.org/rmf/) containing all the frames. RMF is a file format specially designed to store coarse-grained, multi-resolution and multi-state models such as those generated by %IMP. It is a compact binary format and (as in this case) can also be used to store multiple models or trajectories.
40 * Statistics from the sampling, contained in a "statfile", `stat.*.out`. This file contains information on each restraint, MC acceptance criteria and other things at each step.
41 
42 **Gathering Data from statfile**
43 Data from the stat file can be parsed and analyzed using two utilities:
44 * `process_output.py` - parses the statfile and returns columns of interest
45 * `plot_stat.sh` - plots one or two columns of data (requires [gnuplot](http://www.gnuplot.info/download.html))
46 
47 `process_output.py` usage:
48 
49 \code{.sh}
50 IMP_HOME/modules/pmi/pyext/process_output.py [-h] [-f FILENAME] [-s FIELDS [FIELDS ...]]
51  [-t SINGLE_COLUMN_FIELD] [-p] [--head]
52  [-n PRINT_RAW_NUMBER] [--soft]
53  [--search_field SEARCH_FIELD]
54  [--search_value SEARCH_VALUE] [--nframe]
55 \endcode
56 
57 `plot_stat.sh` usage:
58 \code{.sh}
59 IMP_HOME/modules/pmi/pyext/plot_stat.sh -i STATFILE -y YCOLUMN [-x XCOLUMN] [-m POINTS] [-plot] [-o OUTPUTFILE] [-b BEGIN]
60 #
61 # -i | input stat file name
62 # -y | column number with Y data values OR column header string
63 # -x | column number with X data values OR column header string
64 # -m | method of plotting. POINTS, LINES or LINESPOINTS
65 # -s | suppress showing plot
66 # -o | saves plot to png file with column header names
67 # -b | begin at this frame number
68 # -g | saves gnuplot file
69 # -h | prints this help text to screen
70 \endcode
71 
72 ---
73 
74 Analysis of the sampled models is described in \ref rnapolii_4.