CV System

CudaSPONGE CV system documentation for SPONGE 1.4.

This page was translated by GPT-5.5 AI.

Input Control

Input commands are read through cv_in_file. The CV system consists of four parts: CV definitions, virtual atom definitions, CV usage, and program system control. For details, see File Formats. For the type notation used for each parameter, see Input Commands.

Virtual Atom Definitions

When calculating CVs, it is sometimes preferable to use virtual atoms instead of directly using the positions of multiple atoms. The positions of these virtual atoms are generated from other atoms.

center_of_mass

Center of mass

Parameters:

  • atom ([int]): atom list
  • atom_in_file (file): atom list file

center

Center calculated with arbitrary weights

Parameters:

  • atom ([int]): atom list
  • atom_in_file (file): atom list file
  • weight ([float]): weights
  • weight_in_file: weight file

CV Definitions

position_x

x coordinate

Parameters:

  • atom (int): atom

position_y

y coordinate

Parameters:

  • atom (int): atom

position_z

z coordinate

Parameters:

  • atom (int): atom

scaled_position_x

x coordinate divided by the box length along the x axis

Parameters:

  • atom (int): atom

scaled_position_y

y coordinate divided by the box length along the y axis

Parameters:

  • atom (int): atom

scaled_position_z

z coordinate divided by the box length along the z axis

Parameters:

  • atom (int): atom

box_length_x

Box length along the x axis

box_length_y

Box length along the y axis

box_length_z

Box length along the z axis

distance

Distance between two atoms

Parameters:

  • atom (int int): two atoms

displacement_x

x component of the displacement between two atoms

Parameters:

  • atom (int int): two atoms

displacement_y

y component of the displacement between two atoms

Parameters:

  • atom (int int): two atoms

displacement_z

z component of the displacement between two atoms

Parameters:

  • atom (int int): two atoms

angle

Angle formed by three atoms

Parameters:

  • atom (int int int): three atoms

dihedral

Dihedral angle formed by four atoms

Parameters:

  • atom (int int int int): four atoms

rmsd

RMSD between a series of atoms and the reference coordinates

The atom list and reference coordinates can be generated with Xponge maskgen.

Parameters:

  • atom ([int]): atom list
  • atom_in_file (file): atom list file
  • coordinate ([float]): reference coordinates
  • coordinate_in_file (float): reference coordinate file

combination

A value obtained by freely combining CVs Example:

                lx
        {
            CV_type = box_length_x
        }
        ly
        {
            CV_type = box_length_y
        }
        lz
        {
            CV_type = box_length_z
        }
        example_CV
        {
            CV_type = combination
            CV = lx ly lz
            function = lx * ly * lz
        }

In combination expressions, if floating-point numbers are involved, it is best to append f to indicate single-precision floating point, for example 1.0f. Using an integer where a floating-point number is expected may cause a just-in-time compilation error.

Parameters:

  • CV ([CV]): CVs to be combined

  • function ([string]): functional form used for the combination Supported functions and symbols:

    FunctionSymbolFunctionSymbol
    a plus ba + ba minus ba - b
    a times ba * ba divided by ba / b
    a to the power of bpowf(a)(b)natural logarithm of alogf(a)
    e to the power of aexpf(a)complementary error function of aerfcf(a)
    square root of asqrtf(a)cosine of acosf(a)
    sine of asinf(a)tangent of atanf(a)
    arccosine of aacosf(a)arcsine of aasinf(a)
    arctangent of aatanf(a)absolute value of afabsf(a)
    larger of a and bfmaxf(a)(b)smaller of a and bfminf(a)(b)

tabulated

Tabulated mapping for a CV. Intermediate values are calculated with fourth-order B-spline interpolation. Example:

        lx
        {
            CV_type = box_length_x
        }
        example_CV
        {
            CV_type = tabulated
            CV = lx
            min = 0
            max = 100
            parameter = 1 4 0.2 7 9.1 -11
            min_padding = 1.1
            max_padding = 7.7
        }

This example corresponds to the following table: -60 | -40 | -20 | 0 | 20 | 40 | 60 | 80 | 100 | 120 | 140 | 160 --- | 1.1 | 1.1 | 1.1 | 1.0 | 4.0 | 0.2 | 7.0 | 9.1 | -11.0 | 7.7 | 7.7 | 7.7

Parameters:

  • CV ([CV]): CV to interpolate
  • min (float): minimum CV value
  • max (float): maximum CV value
  • parameter ([float]): list of mapped values
  • parameter_in_file (file): mapped value list file
  • min_padding (float): padding value used when the value is smaller than the minimum; used only for interpolation
  • max_padding (float): padding value used when the value is larger than the maximum; used only for interpolation

CV Usage

print

Print CVs Parameters:

  • CV ([CV]): CVs to print

restrain

Harmonic bias potential

Ubias=CVweight(CVreference)2U_{\rm bias} = \sum_{CV}{\rm weight} * (CV - {\rm reference})^2

The weight can change dynamically.

  1. If start_step and max_step are not 0, while reduce_step and stop_step are 0, the weight has the following form:

               harmonic oscillator weight
                    ^
              weight|         +-------------
                    |        /
                    |       /
                    |      /
                    0-----+---+------------>simulation steps
                       start max
  2. If start_step and max_ste are 0, while reduce_step and stop_step are not 0, the weight has the following form:

               harmonic oscillator weight
                    ^
              weight|----------------+
                    |                 \
                    |                  \
                    |                   \
                    0---------------+----+-->simulation steps
                                 reduce stop
  3. If all four step parameters are not 0, the weight has the following form:

               harmonic oscillator weight
                    ^
              weight|         +------+
                    |        /        \
                    |       /          \
                    |      /            \
                    0-----+---+-----+----+-->simulation steps
                       start max reduce stop

Parameters:

  • CV ([CV]): CVs to restrain
  • weight ([float]): weights
  • reference ([float]): reference values
  • period ([float]): CV periods
  • start_step ([int]): step at which weight starts to increase linearly
  • max_step ([int]): step at which weight reaches its maximum
  • reduce_step ([int]): step at which weight starts to decrease linearly
  • stop_step ([int]): step at which weight becomes 0

steer

Linear bias potential

Ubias=CVweightCVU_{\rm bias} = \sum_{CV} {\rm weight} * CV

Parameters:

  • CV ([CV]): CVs to which the bias potential is added
  • weight ([float]): weights

meta1d

One-dimensional metadynamics bias potential

Ubias=theightN(CVt,sigma)welltemp factorU_{\rm bias} = \sum_t {\rm height} * N(CV_t, {\rm sigma}) * \text{welltemp factor}

Parameters:

  • CV (CV): CV to which the bias potential is added
  • CV_minimal (float): minimum CV value
  • CV_maximum (float): maximum CV value
  • dCV (float): grid spacing used when plotting the grid
  • potential_in_file (file): input file for the gridded CV potential energy curve
  • CV_period (float): CV period
  • height (float): height of the added Gaussian potential
  • sigma (float): standard deviation of the added Gaussian potential
  • wall_height (float): initial well depth when the CV is between the minimum and maximum values
  • welltemp_factor (float): welltemp factor; the smaller the value, the more slowly the Gaussian potential is added over time
  • potential_update_interval (int): interval between potential updates