Next: Alchemical Free Energy Methods1
Up: Collective Variable-based Calculations1
Previous: Biasing and analysis methods
Contents
Index
Subsections
Colvars scripting
This interface is particularly useful to implement custom biases as scripted colvar forces.
See the scriptedColvarForces option in 10.5.7.
Note that scripting commands may not be used directly in the NAMD configuration file before the first
run or minimize statement. They may be used either within the callback procedures
(e.g. calc_colvar_forces) or in the NAMD config file after a run or
minimize statement.
Collective variables and biases can be added, queried and deleted through the scripting command cv, with the following syntax: cv
subcommand
[args...].
For example, to query the value of a collective variable named myVar,
use the following syntax: set value [cv colvar myVar value].
All subcommands of cv are documented below.
1]
- configfile
file name
: read configuration from a file;
- config
string
: read configuration from the given string; both config and configfile subcommands may be invoked multiple times;
- reset: delete all internal configuration of the colvars module;
- version: return the version of the colvars code.
- list: return a list of all currently defined variables;
- list biases: return a list of all currently defined biases (i.e. sampling and analysis algorithms);
- load
file name
: load a collective variables state file, typically produced during a simulation;
- save
prefix
: save the current state in a file whose name begins with the given argument; if any of the biases have additional output files defined, those are saved as well;
- update: recalculate all colvars and biases based on the current atomic coordinates;
- printframe: return a summary of the current frame, in a format equivalent to a line of the collective variables trajectory file;
- printframelabels: return text labels for the columns of printframe's output;
- colvar
name
value: return the current value of colvar
name
;
- colvar
name
update: recalculate colvar
name
;
- colvar
name
type: return the type of colvar
name
;
- colvar
name
delete: delete colvar
name
;
- colvar
name
addforce
F
: apply given force on colvar
name
;
- colvar
name
getconfig: return config string of colvar
name
.
- colvar
name
cvcflags
flags
: for a colvar with several cvcs (numbered according to their name
string order), set which cvcs are enabled or disabled in subsequent evaluations according to a list of 0/1 flags (one per cvc).
- bias
name
energy: return the current energy of the bias
name
;
- bias
name
update: recalculate the bias
name
;
- bias
name
delete: delete the bias
name
;
- bias
name
getconfig: return config string of bias
name
.
Next: Alchemical Free Energy Methods1
Up: Collective Variable-based Calculations1
Previous: Biasing and analysis methods
Contents
Index
http://www.ks.uiuc.edu/Research/namd/