1 Stage 3 - Sampling {#rnapolii_3}
4 With the system representation built and data restraints entered, the system is now ready to sample configurations. First, sampling parameters are set:
7 #--------------------------
8 # Set MC Sampling Parameters
9 #--------------------------
14 MC sampling parameters define the number of frames (model structures) which will be output during sampling. `num_mc_steps` defines the number of Monte Carlo steps between output frames. This setup would therefore encompass 200000 MC steps in total.
19 mc1=IMP.pmi.macros.ReplicaExchange0(m,
21 monte_carlo_sample_objects=dof.get_movers(),
22 output_objects=outputobjects,
23 crosslink_restraints=[xl1,xl2],
24 monte_carlo_temperature=1.0,
25 simulated_annealing=True,
26 simulated_annealing_minimum_temperature=1.0,
27 simulated_annealing_maximum_temperature=2.5,
28 simulated_annealing_minimum_temperature_nframes=200,
29 simulated_annealing_maximum_temperature_nframes=20,
30 replica_exchange_minimum_temperature=1.0,
31 replica_exchange_maximum_temperature=2.5,
32 number_of_best_scoring_models=100,
33 monte_carlo_steps=num_mc_steps,
34 number_of_frames=num_frames,
35 global_output_directory=
"output")
39 for a full description of all of the input parameters.
41 The sampling is performed by executing the macro built above:
49 The script generates an `output` directory containing the following:
50 * `pdbs`: a directory containing the 100 best-scoring models (see the `number_of_best_scoring_models` variable above) from the run, in PDB format.
51 * `rmfs`: a single [RMF file](https:
52 * 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.
54 **Gathering Data from statfile**
55 Data from the stat file can be parsed and analyzed
using two utilities:
56 * `process_output.py` - parses the statfile and returns columns of interest
57 * `plot_stat.sh` - plots one or two columns of data (requires [gnuplot](http:
59 `process_output.py` usage:
62 IMP_HOME/modules/pmi/pyext/process_output.py [-h] [-f FILENAME] [-s FIELDS [FIELDS ...]]
63 [-t SINGLE_COLUMN_FIELD] [-p] [--head]
64 [-n PRINT_RAW_NUMBER] [--soft]
65 [--search_field SEARCH_FIELD]
66 [--search_value SEARCH_VALUE] [--nframe]
71 IMP_HOME/modules/pmi/pyext/plot_stat.sh -i STATFILE -y YCOLUMN [-x XCOLUMN] [-m POINTS] [-plot] [-o OUTPUTFILE] [-b BEGIN]
73 # -i | input stat file name
74 # -y | column number with Y data values OR column header string
75 # -x | column number with X data values OR column header string
76 # -m | method of plotting. POINTS, LINES or LINESPOINTS
77 # -s | suppress showing plot
78 # -o | saves plot to png file with column header names
79 # -b | begin at this frame number
80 # -g | saves gnuplot file
81 # -h | prints this help text to screen
86 Analysis of the sampled models is described in \ref rnapolii_4.