Configuration Files for htpolynet analyze¶
analyze is a subcommand that provides a shortcut interface to gmx subcommands for performing analyses of MD trajectories generated during run or postsim phases.
An analyze configuration file is structured as a list of dictionaries, each entry of which is a stage of the analysis. Each stage consists of execution of a gmx analysis and parsing/reporting of its output.
htpolynet analyze is a generic way to interface with the gmx subcommands, and its main advantage is that it is aware of the HTPolyNet project directory structure.
A stage dictionary must have values for the command and subdir keywords; all others are optional.
Keyword |
Description |
|---|---|
|
Gromacs subcommand (required) |
|
Name of directory in which analysis is conducted relative to the project directory (required) |
|
List of files to make symlinks to in the analysis directory, with pathnames relative to the project directory |
|
Gromacs directives; see here; default is the stipulation that the Gromacs command-line is |
|
Keyword:value pairs for any options to the |
|
Name of text file to create and report any output of the command in. |
|
List of greppable strings; only lines matching one or more of these strings are output, if set |
|
List of console inputs one would provide if running the |
Simple examples¶
gmx check
Suppose you wanted to run
gmx checkonproj-0/systems/densification/densified-npt.trrfrom the base directory. At the command line, you could simply issue$ gmx check -f proj-0/systems/densification/densified-npt.trrThis is of course very simple. If you want HTPolyNet to do the same thing, and put the output in a particular place, you could create the YAML input file
my-analysis.yaml:abbr:- command: check subdir: analyze/check links: - systems/densification/densified-npt.trr options: f: densified-npt.trr outfile: check.out matchlines: ['Last frame','Coords']This will generate
check.outin theanalyze/checksubdirectory, and it will only contains lines in the console output ofgmx checkthat match “Last frame” and “Coords”. Then, issuing the command:$ htpolynet analyze -cfg my-analysis.yaml -proj proj-0will perform the execution. Note the ease with which you can reuse this file for all project directories by simply appending project directory names to the
-projoption. For example, if you have project directoriesproj-0,proj-1,proj-2,proj-3, andproj-4, you could simply issue the single command$ htpolynet analyze -cfg my-analysis.yaml -proj proj-?to run the analysis in each project directory.
gmx report-methods
gmx report-methodsis a nifty subcommand that generates readable text describing the MD methods used in a giventprfile. Suppose you want to use this to remind yourself of the methods used in the densification stage of a particular build, say in project directoryproj-0. You could just issue thegmxcommand$ gmx report-methods -s proj-0/systems/densification/densified-npt.tprAgain, very simple. However, using HTPolyNet, you could make a YAML input file
another-analysis.yaml- command: report-methods subdir: analyze/report-methods links: - systems/densification/densified-npt.tpr options: s: densified-npt.tpr m: report.texThis will generate the tex file
report.texin theanalyze/report-methodssubdirectory ofproj-0, if you issue the command$ htpolynet analyze -cfg another-analysis.yaml -proj proj-0
Composites: You can put as many analysis dictionaries in the single YAML input file. For example, concatentating the above together would give the single file
two-analyses.yaml:- command: check subdir: analyze/check links: - systems/densification/densified-npt.trr options: f: densified-npt.trr outfile: check.out matchlines: ['Last frame','Coords'] - command: report-methods subdir: analyze/report-methods links: - systems/densification/densified-npt.tpr options: s: densified-npt.tpr m: report.tex
And then issuing
$ htpolynet analyze -cfg two-analyses.yaml -proj proj-0will run both in series.
These examples should illustrate how powerful htpolynet analyze is for working with large numbers of parallel systems.
Shortcut analyses¶
HTPolyNet provides a small number of shortcut analysis dictionaries prepopulated with default values.
gmx density
If an analysis dictionary just contains the lines
- command: densitythen HTPolyNet assumes the user wants to measure a density profile of all atoms (interative menu option
0) along the z direction (-d Z) in 50 slices (-sl 50) by analyzing the trajectoryequilibrate.trrin the subdirectorypoststim/equilibrate, generating the free-format output filedensity.xvgin theanalyze/densitysubdirectory.
gmx freevolume
If an analysis dictionary just contains the lines
- command: freevolumethen HTPolyNet assumes the user wants to measure the fractional free volume by analyzing the trajectory
equilibrate.trrand input fileequilibrate.tprin the subdirectorypoststim/equilibrate, generating the free-format output fileffv.xvgin theanalyze/freevolumesubdirectory, and reporting console output matching the following: “Free volume”, “Total volume”, “Number of molecules”, “Density”, “Molecular volume Vm assuming homogeneity”, “Molecular van der Waals volume assuming homogeneity”, and “Fractional free volume”.