1 Stage 3 - Sampling {#rnapolii_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:
7 mc1=IMP.pmi.macros.ReplicaExchange0(m,
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")
27 for a full description of all of the input parameters.
29 The sampling is performed by executing the macro built above:
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](http:
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.
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:
47 `process_output.py` usage:
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]
59 IMP_HOME/modules/pmi/pyext/plot_stat.sh -i STATFILE -y YCOLUMN [-x XCOLUMN] [-m POINTS] [-plot] [-o OUTPUTFILE] [-b BEGIN]
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
74 Analysis of the sampled models is described in \ref rnapolii_4.