This section lists all the commands used in LAMMPS to control the behavior of the Colvars module from within a run script using the fix_modify command.
fix_modify Colvars addenergy <E> Add an energy to the MD engine (no effect in VMD) Parameters E : float - Amount of energy to add
fix_modify Colvars config <conf> Read configuration from the given string Parameters conf : string - Configuration string
fix_modify Colvars configfile <conf_file> Read configuration from a file Parameters conf_file : string - Path to configuration file
fix_modify Colvars delete
Delete this Colvars module instance (VMD only)
fix_modify Colvars featurereport Return a summary of Colvars features used so far and their citations Returns report : string - Feature report and citations
fix_modify Colvars frame [frame] Get or set current frame number (VMD only) Parameters frame : integer - Frame number (optional) Returns frame : integer - Frame number
fix_modify Colvars getatomappliedforces Get the list of forces applied by Colvars to atoms Returns forces : array of arrays of floats - Atomic forces
fix_modify Colvars getatomappliedforcesmax Get the maximum norm of forces applied by Colvars to atoms Returns force : float - Maximum atomic force
fix_modify Colvars getatomappliedforcesmaxid Get the atom ID with the largest applied force Returns id : int - ID of the atom with the maximum atomic force
fix_modify Colvars getatomappliedforcesrms Get the root-mean-square norm of forces applied by Colvars to atoms Returns force : float - RMS atomic force
fix_modify Colvars resetatomappliedforces
Reset forces applied by Colvars to atoms
fix_modify Colvars getatomids Get the list of indices of atoms used in Colvars Returns indices : array of ints - Atom indices
fix_modify Colvars getatomcharges Get the list of charges of atoms used in Colvars Returns charges : array of floats - Atomic charges
fix_modify Colvars getatommasses Get the list of masses of atoms used in Colvars Returns masses : array of floats - Atomic masses
fix_modify Colvars getatompositions Get the list of cached positions of atoms used in Colvars Returns positions : array of arrays of floats - Atomic positions
fix_modify Colvars getatomtotalforces Get the list of cached total forces of atoms used in Colvars Returns forces : array of arrays of floats - Atomic total foces
fix_modify Colvars getconfig Get the module's configuration string read so far Returns conf : string - Current configuration string
fix_modify Colvars getenergy Get the current Colvars energy Returns E : float - Amount of energy (internal units)
fix_modify Colvars getnumactiveatomgroups Get the number of atom groups that currently have positive ref counts Returns count : integer - Total number of atom groups
fix_modify Colvars getnumactiveatoms Get the number of atoms that currently have positive ref counts Returns count : integer - Total number of atoms
fix_modify Colvars getnumatoms Get the number of requested atoms, including those not in use now Returns count : integer - Total number of atoms
fix_modify Colvars getstepabsolute Get the current step number of the simulation (including restarts) Returns step : int - Absolute step number
fix_modify Colvars getsteprelative Get the current step number from the start of this job Returns step : int - Relative step number
fix_modify Colvars help [command] Get the help string of the Colvars scripting interface Parameters command : string - Get the help string of this specific command (optional) Returns help : string - Help string
fix_modify Colvars languageversion Get the C++ language version number Returns version : string - C++ language version
fix_modify Colvars list [param] Return a list of all variables or biases Parameters param : string - "colvars" or "biases"; default is "colvars" (optional) Returns list : sequence of strings - List of elements
fix_modify Colvars listcommands Get the list of script functions, prefixed with "cv_", "colvar_" or "bias_" Returns list : sequence of strings - List of commands
fix_modify Colvars listindexfiles Get a list of the index files loaded in this session Returns list : sequence of strings - List of index file names
fix_modify Colvars listinputfiles Get a list of all input/configuration files loaded in this session Returns list : sequence of strings - List of file names
fix_modify Colvars load <prefix> Load data from a state file into all matching colvars and biases Parameters prefix : string - Path to existing state file or input prefix
fix_modify Colvars loadfromstring <buffer> Load state data from a string into all matching colvars and biases Parameters buffer : string - String buffer containing the state information
fix_modify Colvars molid [molid] Get or set the molecule ID on which Colvars is defined (VMD only) Parameters molid : integer - New molecule ID; -1 means undefined (optional) Returns molid : integer - Current molecule ID
fix_modify Colvars printframe Return the values that would be written to colvars.traj Returns values : string - The values
fix_modify Colvars patchversion Get the Colvars patch version number (used for bugfixes only) Returns version : string - Colvars version
fix_modify Colvars printframelabels Return the labels that would be written to colvars.traj Returns Labels : string - The labels
fix_modify Colvars reset
Delete all internal configuration
fix_modify Colvars resetindexgroups
Clear the index groups loaded so far, allowing to replace them
fix_modify Colvars save <prefix> Change the prefix of all output files and save them Parameters prefix : string - Output prefix with trailing ".colvars.state" gets removed)
fix_modify Colvars savetostring Write the Colvars state to a string and return it Returns state : string - The saved state
fix_modify Colvars targettemperature [T] Get/set target temperature, overriding internally what the MD engine reports Parameters T : float - New target temperature in K (internal use) (optional) Returns T : float - Current target temperature in K
fix_modify Colvars timestep [dt] Get/set integration timestep, overriding internally what the MD engine reports Parameters dt : float - New integration timestep in MD engine units (optional) Returns dt : float - Current integration timestep in MD engine units
fix_modify Colvars units [units] Get or set the current Colvars unit system Parameters units : string - The new unit system (optional) Returns units : string - The current unit system
fix_modify Colvars update
Recalculate colvars and biases
fix_modify Colvars version Get the Colvars version string Returns version : string - Colvars version
fix_modify Colvars colvar name addforce <force> Apply the given force onto this colvar (no effects outside run) Parameters force : float or array - Applied force; must match colvar dimensionality Returns force : float or array - Applied force; matches colvar dimensionality
fix_modify Colvars colvar name communicateforces
Communicate bias forces from this colvar to atoms
fix_modify Colvars colvar name cvcflags <flags> Enable or disable individual components by setting their active flags Parameters flags : integer array - Zero/nonzero value disables/enables the CVC
fix_modify Colvars colvar name delete
Delete this colvar, along with all biases that depend on it
fix_modify Colvars colvar name get <feature> Get the value of the given feature for this colvar Parameters feature : string - Name of the feature Returns state : 1/0 - State of the given feature
fix_modify Colvars colvar name getappliedforce Return the total of the forces applied to this colvar Returns force : float - Applied force; matches the colvar dimensionality
fix_modify Colvars colvar name resetbiasforce
Return the total of the forces applied to this colvar
fix_modify Colvars colvar name getatomgroups Return the atom indices used by this colvar as a list of lists Returns groups : array of arrays of ints - Atom indices
fix_modify Colvars colvar name getatomids Return the list of atom indices used by this colvar Returns indices : array of ints - Atom indices
fix_modify Colvars colvar name getconfig Return the configuration string of this colvar Returns conf : string - Current configuration string
fix_modify Colvars colvar name getgradients Return the atomic gradients of this colvar Returns gradients : array of arrays of floats - Atomic gradients
fix_modify Colvars colvar name gettotalforce Return the sum of internal and external forces to this colvar Returns force : float - Total force; matches the colvar dimensionality
fix_modify Colvars colvar name getvolmapids
Return the list of volumetric map indices used by this colvar
fix_modify Colvars colvar name help [command] Get a help summary or the help string of one colvar subcommand Parameters command : string - Get the help string of this specific command (optional) Returns help : string - Help string
fix_modify Colvars colvar name modifycvcs <confs> Modify configuration of individual components by passing string arguments Parameters confs : sequence of strings - New configurations; empty strings are skipped
fix_modify Colvars colvar name run_ave Get the current running average of the value of this colvar Returns value : float or array - Averaged value; matches the colvar dimensionality
fix_modify Colvars colvar name set <feature> <value> Set the given feature of this colvar to a new value Parameters feature : string - Name of the feature value : string - String representation of the new feature value
fix_modify Colvars colvar name state Print a string representation of the feature state of this colvar Returns state : string - The feature state
fix_modify Colvars colvar name type Get the type description of this colvar Returns type : string - Type description
fix_modify Colvars colvar name update Recompute this colvar and return its up-to-date value Returns value : float or array - Current value; matches the colvar dimensionality
fix_modify Colvars colvar name value Get the current value of this colvar Returns value : float or array - Current value; matches the colvar dimensionality
fix_modify Colvars colvar name width Get the width of this colvar Returns width : float - Value of the width
fix_modify Colvars bias name bin Get the current grid bin index (flattened if more than 1d) Returns bin : integer - Bin index
fix_modify Colvars bias name bincount [index] Get the number of samples at the given grid bin (1D ABF only for now) Parameters index : integer - Grid index; defaults to current bin (optional) Returns samples : integer - Number of samples
fix_modify Colvars bias name local_sample_count [radius] Get the number of samples around the current binsamples : integer - Number of samples Parameters radius : integer - Sum over radius bins around current bin (optional)
fix_modify Colvars bias name binnum Get the total number of grid points of this bias (1D ABF only for now) Returns Bins : integer - Number of grid points
fix_modify Colvars bias name delete
Delete this bias
fix_modify Colvars bias name energy Get the current energy of this bias Returns E : float - Energy value
fix_modify Colvars bias name get <feature> Get the value of the given feature for this bias Parameters feature : string - Name of the feature Returns state : 1/0 - State of the given feature
fix_modify Colvars bias name getconfig Return the configuration string of this bias Returns conf : string - Current configuration string
fix_modify Colvars bias name help [command] Get a help summary or the help string of one bias subcommand Parameters command : string - Get the help string of this specific command (optional) Returns help : string - Help string
fix_modify Colvars bias name load <prefix> Load data into this bias Parameters prefix : string - Read from a file with this name or prefix
fix_modify Colvars bias name loadfromstring <buffer> Load state data into this bias from a string Parameters buffer : string - String buffer containing the state information
fix_modify Colvars bias name save <prefix> Save data from this bias into a file with the given prefix Parameters prefix : string - Prefix for the state file of this bias
fix_modify Colvars bias name savetostring Save data from this bias into a string and return it Returns state : string - The bias state
fix_modify Colvars bias name set <feature> <value> Set the given feature of this bias to a new value Parameters feature : string - Name of the feature value : string - String representation of the new feature value
fix_modify Colvars bias name share
Share bias information with other replicas (multiple-walker scheme)
fix_modify Colvars bias name state Print a string representation of the feature state of this bias Returns state : string - String representation of the bias features
fix_modify Colvars bias name type Print the type of this bias object Returns type : string - Type of this bias object (e.g. metadynamics)
fix_modify Colvars bias name update Recompute this bias and return its up-to-date energy Returns E : float - Energy value