reforge.mdsystem package
Submodules
reforge.mdsystem.gmxmd module
File: gmxmd.py
- Description:
This module provides classes and functions for setting up, running, and analyzing molecular dynamics (MD) simulations using GROMACS. The main classes include:
GmxSystem: Provides methods to prepare simulation files, process PDB files, run GROMACS commands, and perform various analyses on MD data.
MDRun: A subclass of GmxSystem dedicated to executing MD simulations and performing post-processing tasks (e.g., RMSF, RMSD, covariance analysis).
- Usage:
Import this module and instantiate the GmxSystem or MDRun classes to set up and run your MD simulations.
- Requirements:
Python 3.x
MDAnalysis
NumPy
Pandas
GROMACS (with CLI tools such as gmx_mpi, gmx, etc.)
The reforge package and its dependencies
Author: DY Date: 2025-02-27
- class reforge.mdsystem.gmxmd.GmxSystem(sysdir, sysname)[source]
Bases:
MDSystem
Class to set up and analyze protein-nucleotide-lipid systems for MD simulations using GROMACS.
Most attributes are paths to files and directories needed to set up and run the MD simulation.
- MDATDIR = PosixPath('/scratch/dyangali/reforge/reforge/martini/datdir')
- MMDPDIR = PosixPath('/scratch/dyangali/reforge/reforge/martini/datdir/mdp')
- MITPDIR = PosixPath('/scratch/dyangali/reforge/reforge/martini/itp')
- gmx(command='-h', clinput=None, clean_wdir=True, **kwargs)[source]
Executes a GROMACS command from the system’s root directory.
- Parameters:
command (str) (The GROMACS command to run (default: “-h”).)
clinput (str, optional) (Input to pass to the command’s stdin.)
clean_wdir (bool, optional) (If True, cleans the working directory after execution.)
kwargs (Additional keyword arguments to pass to gromacs.)
- prepare_files()[source]
Prepares the simulation by creating necessary directories and copying input files.
- The method:
Creates directories for proteins, nucleotides, topologies, maps, mdp files, coarse-grained PDBs, GRO files, MD runs, data, and PNG outputs.
Copies .mdp files from the master MDP directory.
Copies ‘water.gro’ and ‘atommass.dat’ from the master data directory.
Copies .itp files from the master ITP directory to the system topology directory.
- make_box(**kwargs)[source]
Sets up simulation box with GROMACS editconf command.
- Parameters:
kwargs (Additional keyword arguments for the GROMACS editconf command. Defaults:) –
d: Distance parameter (default: 1.0)
bt: Box type (default: “dodecahedron”).
- make_cg_topology(add_resolved_ions=False, prefix='chain')[source]
Creates the system topology file by including all relevant ITP files and defining the system and molecule sections.
- Parameters:
add_resolved_ions (bool, optional) (If True, counts and includes resolved ions.)
prefix (str, optional) (Prefix for ITP files to include (default: “chain”).)
Writes the topology file (self.systop) with include directives and molecule counts.
- make_gro_file(d=1.25, bt='dodecahedron')[source]
Generates the final GROMACS GRO file from coarse-grained PDB files.
- Parameters:
d (float, optional) (Distance parameter for the editconf command (default: 1.25).)
bt (str, optional) (Box type for the editconf command (default: “dodecahedron”).)
Converts PDB files to GRO files, merges them, and adjusts the system box.
- solvate(**kwargs)[source]
Solvates the system using GROMACS solvate command.
- Parameters:
kwargs (Additional parameters for the solvate command. Defaults:) –
cp: “solute.pdb”
cs: “water.gro”
- add_bulk_ions(solvent='W', **kwargs)[source]
Adds bulk ions to neutralize the system using GROMACS genion.
- Parameters:
solvent (str, optional) – Solvent residue name (default: “W”).
kwargs (dict) – Additional parameters for genion. Defaults include: - conc: 0.15 - pname: “NA” - nname: “CL” - neutral: “”
- make_system_ndx(backbone_atoms=('CA', 'P', "C1'"), water_resname='W')[source]
Creates an index (NDX) file for the system, separating solute, backbone, solvent, and individual chains.
- Parameters:
backbone_atoms (list, optional) – List of atom names to include in the backbone (default: [“CA”, “P”, “C1’”]).
- class reforge.mdsystem.gmxmd.GmxRun(sysdir, sysname, runname)[source]
Bases:
MDRun
Subclass of GmxSystem for executing molecular dynamics (MD) simulations and performing post-processing analyses.
- gmx(command='-h', clinput=None, clean_wdir=True, **kwargs)[source]
Executes a GROMACS command from the run’s root directory.
- Parameters:
command (str) (The GROMACS command to run (default: “-h”).)
clinput (str, optional) (Input to pass to the command’s stdin.)
clean_wdir (bool, optional) (If True, cleans the working directory after execution.)
kwargs (Additional keyword arguments to pass to gromacs.)
- empp(**kwargs)[source]
Prepares the energy minimization run using GROMACS grompp.
- Parameters:
kwargs (Additional parameters for grompp. Defaults include:) –
f: Path to .mdp file.
c: Structure file.
r: Reference structure.
p: Topology file.
n: Index file.
o: Output TPR file (“em.tpr”).
- hupp(**kwargs)[source]
Prepares the heat-up phase using GROMACS grompp.
- Parameters:
kwargs (Additional parameters for grompp. Defaults include:) –
f: Path to .mdp file
c: Starting structure (“em.gro”).
r: Reference structure (“em.gro”).
p: Topology file.
n: Index file.
o: Output TPR file (“hu.tpr”).
- eqpp(**kwargs)[source]
Prepares the equilibration phase using GROMACS grompp.
- Parameters:
kwargs (Additional parameters for grompp. Defaults include:) –
f: Path to .mdp file.
c: Starting structure (“hu.gro”).
r: Reference structure (“hu.gro”).
p: Topology file.
n: Index file.
o: Output TPR file (“eq.tpr”).
- mdpp(**kwargs)[source]
Prepares the production MD run using GROMACS grompp.
- Parameters:
kwargs (Additional parameters for grompp. Defaults include:) –
f: Path to .mdp file.
c: Starting structure (“eq.gro”).
r: Reference structure (“eq.gro”).
p: Topology file.
n: Index file.
o: Output TPR file (“md.tpr”).
- mdrun(**kwargs)[source]
Executes the production MD run using GROMACS mdrun.
- Parameters:
kwargs (Additional parameters for mdrun. Defaults include:) –
deffnm: “md”
nsteps: “-2”
ntomp: “8”
- trjconv(clinput=None, **kwargs)[source]
Converts trajectories using GROMACS trjconv.
- Parameters:
clinput (str, optional) (Input to be passed to trjconv.)
kwargs (Additional parameters for trjconv.)
- rmsf(clinput=None, **kwargs)[source]
Calculates RMSF using GROMACS rmsf.
- Parameters:
clinput (str, optional) (Input for the rmsf command.)
kwargs (Additional parameters for rmsf. Defaults include:) –
s: Structure file.
f: Trajectory file.
o: Output xvg file.
- rmsd(clinput=None, **kwargs)[source]
Calculates RMSD using GROMACS rms.
- Parameters:
clinput (str, optional) (Input for the rms command.)
kwargs (Additional parameters for rms. Defaults include:) –
s: Structure file.
f: Trajectory file.
o: Output xvg file.
- rdf(clinput=None, **kwargs)[source]
Calculates the radial distribution function using GROMACS rdf.
- Parameters:
clinput (str, optional) (Input for the rdf command.)
kwargs (Additional parameters for rdf. Defaults include:) –
f: Trajectory file.
s: Structure file.
n: Index file.
- cluster(clinput=None, **kwargs)[source]
Performs clustering using GROMACS cluster.
- Parameters:
clinput (str, optional) (Input for the clustering command.)
kwargs (Additional parameters for cluster.)
- extract_cluster(clinput=None, **kwargs)[source]
Extracts frames belonging to a cluster using GROMACS extract-cluster.
- Parameters:
clinput (str, optional) (Input for the extract-cluster command.)
kwargs (Additional parameters for extract-cluster. Defaults include:)
- clusters (“cluster.ndx”)
- covar(clinput=None, **kwargs)[source]
Calculates and diagonalizes the covariance matrix using GROMACS covar.
- Parameters:
clinput (str, optional) (Input for the covar command.)
kwargs (Additional parameters for covar. Defaults include:)
- f (Trajectory file.)
- s (Structure file.)
- n (Index file.)
- anaeig(clinput=None, **kwargs)[source]
Analyzes eigenvectors using GROMACS anaeig.
- Parameters:
clinput (str, optional) (Input for the anaeig command.)
kwargs (Additional parameters for anaeig. Defaults include:)
- f (Trajectory file.)
- s (Structure file.)
- v (Output eigenvector file.)
- make_edi(clinput=None, **kwargs)[source]
Prepares files for essential dynamics analysis using GROMACS make-edi.
- Parameters:
clinput (str, optional) (Input for the make-edi command.)
kwargs (Additional parameters for make-edi. Defaults include:)
- f (Eigenvector file.)
- s (Structure file.)
- get_rmsf_by_chain(**kwargs)[source]
Calculates RMSF for each chain in the system using GROMACS rmsf.
- Parameters:
kwargs (Additional parameters for the rmsf command. Defaults include:)
- f (Trajectory file.)
- s (Structure file.)
- n (Index file.)
- res (Whether to output per-residue RMSF (default: “no”).)
- fit (Whether to fit the trajectory (default: “yes”).)
reforge.mdsystem.mdsystem module
File: mdsystem.py
- Description:
This module provides classes and functions for setting up, running, and analyzing molecular dynamics (MD) simulations. The main classes include:
Usage:
- Requirements:
Python 3.x
MDAnalysis
NumPy
Pandas
The reforge package and its dependencies
Author: DY Date: 2025-02-27
- class reforge.mdsystem.mdsystem.MDSystem(sysdir, sysname)[source]
Bases:
object
Most attributes are paths to files and directories needed to set up and run the MD simulation.
- NUC_RESNAMES = ['A', 'C', 'G', 'U', 'RA3', 'RA5', 'RC3', 'RC5', 'RG3', 'RG5', 'RU3', 'RU5']
- property chains
Retrieves and returns a sorted list of chain identifiers from the input PDB.
- Returns:
list: Sorted chain identifiers extracted from the PDB file.
- property segments
Same as for chains but for segments IDs
- sort_input_pdb(in_pdb='inpdb.pdb')[source]
Sorts and renames atoms and chains in the input PDB file.
- Parameters:
in_pdb (str) (Path to the input PDB file (default: “inpdb.pdb”).)
Uses pdbtools to perform sorting and renaming, saving the result to self.inpdb.
- clean_pdb_mm(in_pdb=None, **kwargs)[source]
Cleans the starting PDB file using PDBfixer (via OpenMM).
- Parameters:
in_pdb (str, optional) (Input PDB file to clean. If None, uses self.inpdb.)
kwargs (Additional keyword arguments for pdbtools.clean_pdb.)
- clean_pdb_gmx(in_pdb=None, **kwargs)[source]
Cleans the PDB file using GROMACS pdb2gmx tool.
- Parameters:
in_pdb (str, optional) (Input PDB file to clean. If None, uses self.inpdb.)
kwargs (Additional keyword arguments for the GROMACS command.)
After running pdb2gmx, cleans up temporary files (e.g., “topol*” and “posre*”).
- split_chains()[source]
Splits the input PDB file into separate files for each chain.
Nucleotide chains are saved to self.nucdir, while protein chains are saved to self.prodir. The determination is based on the residue names.
- clean_chains_mm(**kwargs)[source]
Cleans chain-specific PDB files using PDBfixer (OpenMM).
Kwargs are passed to pdbtools.clean_pdb. Also renames chain IDs based on the file name.
- clean_chains_gmx(**kwargs)[source]
Cleans chain-specific PDB files using GROMACS pdb2gmx tool.
- Parameters:
kwargs (Additional keyword arguments for the GROMACS command.)
Processes all files in the protein and nucleotide directories, renaming chains and cleaning temporary files afterward.
- get_go_maps(append=False)[source]
Retrieves GO contact maps for proteins using the RCSU server.
http://info.ifpan.edu.pl/~rcsu/rcsu/index.html
- Parameters:
append (bool, optional) (If True, filters out maps that already exist in self.mapdir.)
- martinize_proteins_go(append=False, **kwargs)[source]
Performs virtual site-based GoMartini coarse-graining on protein PDBs.
Uses Martinize2 from https://github.com/marrink-lab/vermouth-martinize. All keyword arguments are passed directly to Martinize2. Run martinize2 -h to see the full list of parameters.
- Parameters:
append (bool, optional) (If True, only processes proteins for) – which corresponding topology files do not already exist.
kwargs (Additional parameters for the martinize_go function.)
Generates .itp files and cleans temporary directories after processing.
- martinize_proteins_en(append=False, **kwargs)[source]
Generates an elastic network for proteins using the Martini elastic network model.
Uses Martinize2 from https://github.com/marrink-lab/vermouth-martinize. All keyword arguments are passed directly to Martinize2. Run martinize2 -h to see the full list of parameters.
- Parameters:
append (bool, optional) (If True, processes only proteins that do not) – already have corresponding topology files.
kwargs (Elastic network parameters (e.g., elastic bond force constants, cutoffs).)
Modifies the generated ITP files by replacing the default molecule name with the actual protein name and cleans temporary files.
- martinize_nucleotides(**kwargs)[source]
Performs coarse-graining on nucleotide PDBs using the martinize_nucleotide tool.
- Parameters:
append (bool, optional) (If True, skips already existing topologies.)
kwargs (Additional parameters for the martinize_nucleotide function.)
After processing, renames files and moves the resulting ITP files to the topology directory.
- martinize_rna(append=False, **kwargs)[source]
Coarse-grains RNA molecules using the martinize_rna tool.
- Parameters:
append (bool, optional) (If True, processes only RNA files without existing topologies.)
kwargs (Additional parameters for the martinize_rna function.)
Exits the process with an error message if coarse-graining fails.
- find_resolved_ions(mask=('MG', 'ZN', 'K'))[source]
Identifies resolved ions in the input PDB file and writes them to “ions.pdb”.
- Parameters:
mask (list, optional) (List of ion identifiers to look for (default: [“MG”, “ZN”, “K”]).)
- count_resolved_ions(ions=('MG', 'ZN', 'K'))[source]
Counts the number of resolved ions in the system PDB file.
- Parameters:
ions (list, optional) – List of ion names to count (default: [“MG”, “ZN”, “K”]).
- Returns:
A dictionary mapping ion names to their counts.
- Return type:
dict
- get_mean_sem(pattern='dfi*.npy')[source]
Calculates the mean and standard error of the mean (SEM) from numpy files.
- Parameters:
pattern (str, optional) (Filename pattern to search for (default: “dfi.npy”).*)
Saves the calculated averages and errors as numpy files in the data directory.
- get_td_averages(pattern, loop=True)[source]
Calculates time-dependent averages from a set of numpy files.
- Parameters:
fname (str) (Filename pattern to pull files from the MD runs directory.)
loop (bool, optional) (If True, processes files sequentially (default: True).)
- Returns:
numpy.ndarray: The time-dependent average.
- class reforge.mdsystem.mdsystem.MDRun(sysdir, sysname, runname)[source]
Bases:
MDSystem
Subclass of MDSystem for executing molecular dynamics (MD) simulations and performing post-processing analyses.
- get_covmats(u, ag, **kwargs)[source]
Calculates covariance matrices by splitting the trajectory into chunks.
- Parameters:
u (MDAnalysis.Universe, optional) (Pre-loaded MDAnalysis Universe; if None, creates one.)
ag (AtomGroup, optional) (Atom selection; if None, selects backbone atoms.)
sample_rate (int, optional) (Sampling rate for positions.)
b (int, optional) (Begin time/frame.)
e (int, optional) (End time/frame.)
n (int, optional) (Number of covariance matrices to calculate.)
outtag (str, optional) (Tag prefix for output files.)
- get_pertmats(intag='covmat', outtag='pertmat')[source]
Calculates perturbation matrices from the covariance matrices.
- Parameters:
intag (str, optional) (Input file tag for covariance matrices.)
outtag (str, optional) (Output file tag for perturbation matrices.)
- get_dfi(intag='pertmat', outtag='dfi')[source]
Calculates Dynamic Flexibility Index (DFI) from perturbation matrices.
- Parameters:
intag (str, optional) (Input file tag for perturbation matrices.)
outtag (str, optional) (Output file tag for DFI values.)
- get_dci(intag='pertmat', outtag='dci', asym=False)[source]
Calculates the Dynamic Coupling Index (DCI) from perturbation matrices.
- Parameters:
intag (str, optional) (Input file tag for perturbation matrices.)
outtag (str, optional) (Output file tag for DCI values.)
asym (bool, optional) (If True, calculates asymmetric DCI.)
- get_group_dci(groups, labels, **kwargs)[source]
Calculates DCI between specified groups based on perturbation matrices.
- Parameters:
groups (list) (List of groups (atom indices or similar) to compare.)
labels (list) (Corresponding labels for the groups.)
asym (bool, optional) (If True, computes asymmetric group DCI.)
reforge.mdsystem.mmmd module
Module mmmd
This module defines classes and functions to set up and run coarse-grained (CG) molecular dynamics simulations using OpenMM and associated tools. It includes the system preparation, file management, and MD run routines.
Classes
- MmSystem
Sets up and analyzes protein-nucleotide-lipid systems for MD simulations.
- MdRun
Inherits from MmSystem to perform an MD simulation run, including energy minimization, equilibration, and production.
Helper Functions
- sort_uld(alist)
Sorts characters in a list so that uppercase letters come first, then lowercase, followed by digits.
- class reforge.mdsystem.mmmd.MmSystem(sysdir, sysname, **kwargs)[source]
Bases:
object
Set up and analyze protein–nucleotide–lipid systems for CG MD simulation.
This class initializes file paths and directories required for running CG molecular dynamics simulations.
- Parameters:
sysdir (str) – Directory for the system files.
sysname (str) – Name of the system.
**kwargs (dict, optional) – Additional keyword arguments (currently unused).
- Variables:
sysname (str) – Name of the system.
sysdir (str) – Absolute path to the system directory.
wdir (str) – Working directory (sysdir joined with sysname).
inpdb (str) – Path to the input PDB file.
syspdb (str) – Path to the system PDB file.
sysxml (str) – Path to the system XML file.
mdcpdb (str) – Path to the MD configuration PDB file.
trjpdb (str) – Path to the trajectory PDB file.
prodir (str) – Directory for protein files.
nucdir (str) – Directory for nucleotide files.
iondir (str) – Directory for ion files.
ionpdb (str) – Path to the ion PDB file.
topdir (str) – Directory for topology files.
mapdir (str) – Directory for mapping files.
mdpdir (str) – Directory for MD parameter files.
cgdir (str) – Directory for CG PDB files.
mddir (str) – Directory for MD run files.
datdir (str) – Directory for data files.
pngdir (str) – Directory for PNG figures.
_chains (list) – Cached list of chain identifiers.
_mdruns (list) – Cached list of MD run directories.
- MDATDIR = PosixPath('/scratch/dyangali/reforge/reforge/martini/data')
- MITPDIR = PosixPath('/scratch/dyangali/reforge/reforge/martini/itp')
- NUC_RESNAMES = ['A', 'C', 'G', 'U', 'RA3', 'RA5', 'RC3', 'RC5', 'RG3', 'RG5', 'RU3', 'RU5']
- property chains
Retrieve the chain identifiers from the system PDB file.
- Returns:
List of chain identifiers.
- Return type:
list
Notes
If chain IDs have already been extracted, returns the cached list. Otherwise, parses the system PDB file.
- property mdruns
Retrieve the list of MD run directories.
- Returns:
List of MD run directory names.
- Return type:
list
Notes
If the list is already cached, returns it. Otherwise, looks up the directories in the MD runs folder.
- prepare_files()[source]
Prepare simulation directories and copy necessary input files.
Notes
Creates directories (proteins, nucleotides, topology, mapping, MD parameters, CG PDB, MD runs, data, PNG) and copies files from source directories.
- clean_pdb(pdb_file, **kwargs)[source]
Clean the starting PDB file using PDBfixer by OpenMM.
- Parameters:
pdb_file (str) – Path to the input PDB file.
**kwargs (dict, optional) – Additional keyword arguments for the cleaning routine.
- static forcefield(force_field='amber14-all.xml', water_model='amber14/tip3p.xml', **kwargs)[source]
Create and return an OpenMM ForceField object.
- Parameters:
force_field (str, optional) – Force field file or identifier (default: ‘amber14-all.xml’).
water_model (str, optional) – Water model file or identifier (default: ‘amber14/tip3p.xml’).
**kwargs (dict, optional) – Additional keyword arguments for the ForceField constructor.
- Returns:
The constructed ForceField object.
- Return type:
openmm.app.ForceField
- static modeller(inpdb, forcefield, **kwargs)[source]
Generate a modeller object with added solvent.
- Parameters:
inpdb (str) – Path to the input PDB file.
forcefield (openmm.app.ForceField) – The force field object to be used.
**kwargs (dict, optional) –
- Additional keyword arguments for solvent addition. Default values include:
model : ‘tip3p’ boxShape : ‘dodecahedron’ padding : 1.0 * nanometer positiveIon : ‘Na+’ negativeIon : ‘Cl-’ ionicStrength : 0.1 * molar
- Returns:
The modeller object with solvent added.
- Return type:
openmm.app.Modeller
- model(forcefield, modeller_obj, barostat=None, thermostat=None, **kwargs)[source]
Create a simulation model using the specified force field and modeller.
- Parameters:
forcefield (openmm.app.ForceField) – The force field object.
modeller_obj (openmm.app.Modeller) – The modeller object with the prepared topology.
barostat (openmm.Force, optional) – Barostat force to add (default: None).
thermostat (openmm.Force, optional) – Thermostat force to add (default: None).
**kwargs (dict, optional) –
- Additional keyword arguments for creating the system. Defaults include:
nonbondedMethod : app.PME nonbondedCutoff : 1.0 * nanometer constraints : app.HBonds
- Returns:
The simulation system created by the force field.
- Return type:
openmm.System
- class reforge.mdsystem.mmmd.MdRun(sysdir, sysname, runname)[source]
Bases:
MmSystem
Run molecular dynamics (MD) simulation using specified input files.
This class extends MmSystem to perform an MD simulation run including energy minimization, equilibration, and production.
- Parameters:
sysdir (str) – Directory for the system files.
sysname (str) – Name of the system.
runname (str) – Name of the MD run.
- Variables:
rundir (str) – Directory for the run files.
rmsdir (str) – Directory for RMS analysis.
covdir (str) – Directory for covariance analysis.
lrtdir (str) – Directory for LRT analysis.
cludir (str) – Directory for clustering.
pngdir (str) – Directory for output figures.
- prepare_files()[source]
Create directories required for the MD run.
Notes
Creates directories for run outputs including RMS, covariance, LRT, clustering, and figures.
- build_modeller()[source]
Generate a modeller object from the system PDB file.
- Returns:
The modeller object initialized with the system topology and positions.
- Return type:
openmm.app.Modeller
- simulation(modeller_obj, integrator)[source]
Initialize and return a simulation object for the MD run.
- Parameters:
modeller_obj (openmm.app.Modeller) – The modeller object with prepared topology and positions.
integrator (openmm.Integrator) – The integrator for the simulation.
- Returns:
The initialized simulation object.
- Return type:
openmm.app.Simulation
- save_state(simulation_obj, file_prefix='sim')[source]
Save the current simulation state to XML and PDB files.
- Parameters:
simulation_obj (openmm.app.Simulation) – The simulation object.
file_prefix (str, optional) – Prefix for the state files (default: ‘sim’).
Notes
Saves the simulation state as an XML file and writes the current positions to a PDB file.
- em(simulation_obj, tolerance=100, max_iterations=1000)[source]
Perform energy minimization for the simulation.
- Parameters:
simulation_obj (openmm.app.Simulation) – The simulation object.
tolerance (float, optional) – Tolerance for energy minimization (default: 100).
max_iterations (int, optional) – Maximum number of iterations (default: 1000).
Notes
Minimizes the energy, saves the minimized state, and logs progress.
- eq(simulation_obj, nsteps=10000, nlog=10000, **kwargs)[source]
Run equilibration simulation.
- Parameters:
simulation_obj (openmm.app.Simulation) – The simulation object.
nsteps (int, optional) – Number of steps for equilibration (default: 10000).
nlog (int, optional) – Logging frequency (default: 10000).
**kwargs (dict, optional) – Additional keyword arguments for the StateDataReporter.
Notes
Loads the minimized state, runs equilibration, and saves the equilibrated state.
- md(simulation_obj, nsteps=100000, nout=1000, nlog=10000, nchk=10000, **kwargs)[source]
Run production MD simulation.
- Parameters:
simulation_obj (openmm.app.Simulation) – The simulation object.
nsteps (int, optional) – Number of production steps (default: 100000).
nout (int, optional) – Frequency for writing trajectory frames (default: 1000).
nlog (int, optional) – Logging frequency (default: 10000).
nchk (int, optional) – Checkpoint frequency (default: 10000).
**kwargs (dict, optional) – Additional keyword arguments for the StateDataReporter.
Notes
Loads the equilibrated state, runs production, and saves the final simulation state.
- reforge.mdsystem.mmmd.sort_uld(alist)[source]
Sort characters in a list in a specific order.
- Parameters:
alist (list of str) – List of characters to sort.
- Returns:
Sorted list with uppercase letters first, then lowercase letters, and digits last.
- Return type:
list of str
Notes
This function is used to help organize GROMACS multichain files.