metafalcon.cvs package

Submodules

metafalcon.cvs.angle module

Contains a class for using the angle between three atoms as a CV.

class metafalcon.cvs.angle.cv_angle(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Angle between three atoms as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

atoms (list of int) – list of three atom indices for the calculation of the angle

set_s_and_ds(coords)[source]

Calculate angle and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.balaban module

Contains a class for using the 3D Balaban index as a CV.

class metafalcon.cvs.balaban.cv_balaban(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Balaban index as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • exclude_h (bool) – do not include distances to hydrogen atoms (default: False)
  • update_adjacency (bool) – update the adjacency in every dynamics step (default: False)
get_adjacencymatrix(coords)[source]

Calculate the adjacency matrix for the given coordinates.

Parameters:coords (np.2darray (shape: (N, 3))) – atomic xyz-coordinates of the molecule (bohr)
Returns:am – adjacency matrix
Return type:np.2darray (shape: (N, N))
get_edges(am)[source]

Return edges from the adjacency matrix.

Parameters:am (np.2darray (shape: (N, N))) – adjacency matrix
Returns:edges – pairs of connected atoms
Return type:np.2darray (shape: (Nedges, 2))
get_distancematrix(coords)[source]

Return the geometrical distance matrix.

Parameters:coords (np.2darray (shape: (N, 3))) – atomic xyz-coordinates of the molecule (bohr)
Returns:dm – geometrical distance matrix
Return type:np.2darray (shape: (N, N))
get_ddistancematrix(coords)[source]

Return the gradient of the geometrical distance matrix.

Parameters:coords (np.2darray (shape: (N, 3))) – atomic xyz-coordinates of the molecule (bohr)
Returns:ddm – gradient of the geometrical distance matrix
Return type:np.2darray (shape: (N, N, N, 3))
get_balaban(dm, edges)[source]

Return Balaban index.

Parameters:
  • dm (np.2darray (shape: (N, N))) – geometrical distance matrix
  • edges (np.2darray (shape: (Nedges, 2))) – pairs of connected atoms
Returns:

balaban – 3D Balaban index

Return type:

float

get_dbalaban(dm, ddm, edges)[source]

Return the gradient of the Balaban index.

Parameters:
  • dm (np.2darray (shape: (N, N))) – geometrical distance matrix
  • ddm (np.2darray (shape: (N, N, N, 3))) – gradient of the geometrical distance matrix
  • edges (np.2darray (shape: (Nedges, 2))) – pairs of connected atoms
Returns:

dbalaban – gradient of the 3D Balaban index

Return type:

np.2darray (shape: (N, 3))

set_s_and_ds(coords)[source]

Calculate 3D Balaban index and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.bond module

Contains a class for using the bond length between two atoms as a CV.

class metafalcon.cvs.bond.cv_bond(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Bond length between two atoms as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

atoms (list of int) – list of two atom indices for the calculation of the bond length

set_s_and_ds(coords)[source]

Calculate bond length and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.cn module

Contains a class for using the coordination number of an atom as a CV.

class metafalcon.cvs.cn.cv_cn(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Coordination number as a collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • atom (int) – atom index for the calculation of the coordination number
  • reference (list of int) – indices of reference atoms to be included (default: all atoms other than atom)
  • n (int) – first exponent
  • m (int) – second exponent
  • d ("auto" or float or list of float) – single distance or list of distances for all atoms in reference (default: ‘auto’)
set_s_and_ds(coords)[source]

Calculate angle and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.cremerpople module

Functions for the calculation of Cremer-Pople parameters and their gradients.

@author: Karina Sultangaleeva

metafalcon.cvs.cremerpople.schwerpunkt(coord_old)[source]
metafalcon.cvs.cremerpople.drehung(coord_old)[source]
metafalcon.cvs.cremerpople.find_n(coord_old)[source]
metafalcon.cvs.cremerpople.find_phi_cos(coord_old)[source]
metafalcon.cvs.cremerpople.find_phi_sin(coord_old)[source]
metafalcon.cvs.cremerpople.find_phi(coord_old)[source]
metafalcon.cvs.cremerpople.find_Q(coord_old)[source]
metafalcon.cvs.cremerpople.find_q3(coord_old)[source]
metafalcon.cvs.cremerpople.find_q2(coord_old)[source]
metafalcon.cvs.cremerpople.find_theta(coord_old)[source]
metafalcon.cvs.cremerpople.find_A(coord_old)[source]
metafalcon.cvs.cremerpople.find_B(coord_old)[source]
metafalcon.cvs.cremerpople.reshape(func)[source]
metafalcon.cvs.cremerpople.numeric_derive(func, coord_old, delta)[source]
metafalcon.cvs.cremerpople.n_d(func, coord_old, delta)[source]
metafalcon.cvs.cremerpople.dn(coord)[source]
metafalcon.cvs.cremerpople.d_B(coord)[source]
metafalcon.cvs.cremerpople.d_A(coord)[source]
metafalcon.cvs.cremerpople.Matrix()[source]
metafalcon.cvs.cremerpople.dZ_dR(coord_old)[source]
metafalcon.cvs.cremerpople.dQ_dZ(coord_old)[source]
metafalcon.cvs.cremerpople.dQ(coord_old)[source]
metafalcon.cvs.cremerpople.dPhi_dZ(coord_old)[source]
metafalcon.cvs.cremerpople.dPhi(coord_old)[source]
metafalcon.cvs.cremerpople.dq3(coord_old)[source]
metafalcon.cvs.cremerpople.dq2(coord_old)[source]
metafalcon.cvs.cremerpople.dTheta(coord_old)[source]

metafalcon.cvs.cremerpople_phi module

Contains a class for using Cremer Pople angle phi as a CV.

class metafalcon.cvs.cremerpople_phi.cv_cremerpople_phi(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Cremer-Pople angle phi as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

atoms (list of int) – list of ring atoms to be used for the Cremer-Pople calculation in correct ordering

set_s_and_ds(coords)[source]

Calculate theta and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.cremerpople_q module

Contains a class for using Cremer Pople total amplitude Q as a CV.

class metafalcon.cvs.cremerpople_q.cv_cremerpople_q(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Cremer-Pople total ampltiude Q as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

atoms (list of int) – list of ring atoms to be used for the Cremer-Pople calculation in correct ordering

set_s_and_ds(coords)[source]

Calculate Q and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.cremerpople_theta module

Contains a class for using Cremer Pople angle theta as a CV.

class metafalcon.cvs.cremerpople_theta.cv_cremerpople_theta(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Cremer-Pople angle theta as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

atoms (list of int) – list of ring atoms to be used for the Cremer-Pople calculation in correct ordering

set_s_and_ds(coords)[source]

Calculate theta and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.custom module

Contains a class for embedding own CV implementations.

class metafalcon.cvs.custom.cv_custom(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

User-defined collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • filename (str) – name of the python module for the evaluation of the CV and its gradient (default: cvcustom)
  • parameters (dict) – configuration parameters handed over to the functions in filename
set_s_and_ds(coords)[source]

Calculate custom CV and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.cv module

Contains a general collective variable class that is inherited by individual CVs.

class metafalcon.cvs.cv.cv(idx, symbols, **kwargs)[source]

Collective variable class.

Parameters:
  • idx (int) – index of the cv, used for filename-numbering
  • symbols (list of str) – atomic symbols of the molecule
  • kwargs – See below
Keyword Arguments:
 
  • name (str) – name of the collective variable
  • type (str) – type of the collective variable
  • width (float) – width of the added Gaussians
  • active (bool) – whether CV is used for metadynamics
  • thresh (bool) – whether to use threshold to switch off / on the addition of Gaussians
  • thresh_type (str) – type of threshold to be used (upper | lower)
  • thresh_value (float) – value of the CV to switch off / on the addition of Gaussians
  • periodic (bool) – whether to use periodic boundaries for the CV
  • periodic_type (str) – type of periodic boundaries for the CV (mirror | continue)
  • periodic_start (float) – start value of the periodic range
  • periodic_end (float) – end value of the periodic range
Variables:
  • idx
  • symbols
  • kwargs
  • tmp
  • name
  • type
  • width
  • active
  • thresh
  • thresh_type
  • thresh_value
  • update
  • use_wall
  • s
  • ds_dr
  • step
  • shift
  • ticks
  • periodic
  • periodic_type
  • periodic_start
  • periodic_end
  • au2unit
initialize()[source]
get_kwargs(key, default=None)[source]
reset_width()[source]
set_step(step)[source]
set_update(value)[source]
delete_tmpfile()[source]
set_plot(plot)[source]
set_wall_s()[source]
set_wall(wall_kwargs)[source]
convert_units(s)[source]
get_s()[source]

Get current value of the collective variable.

Returns:s – current value of the CV
Return type:float
get_ds_dr()[source]

Get current gradient of the collective variable.

Returns:s – current gradient of the CV (shape: (N, 3))
Return type:np.2darray

metafalcon.cvs.cv_template module

Contains a class for using TEMPLATE as a CV.

class metafalcon.cvs.cv_template.cv_template(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

TEMPLATE as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

arg (int) – argument corresponding to TEMPLATE CV

set_s_and_ds(coords)[source]

Calculate TEMPLATE value and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.cvfunctions module

Contains useful functions for the determination of CV values and gradients.

metafalcon.cvs.cvfunctions.bond(coord)[source]
metafalcon.cvs.cvfunctions.dbond(coord)[source]
metafalcon.cvs.cvfunctions.angle(coord)[source]
metafalcon.cvs.cvfunctions.dangle(coord)[source]
metafalcon.cvs.cvfunctions.torsion(coord)[source]
metafalcon.cvs.cvfunctions.dtorsion(coord)[source]

Implementation according to van Schalk et al, J. Mol. Biol. 234, 751 / https://salilab.org/modeller/9v6/manual/node436.html

metafalcon.cvs.cvfunctions.cn_i(r, d, n, m)[source]
metafalcon.cvs.cvfunctions.dcn_i(r, d, n, m)[source]
metafalcon.cvs.cvfunctions.get_d(symb, i, j)[source]
metafalcon.cvs.cvfunctions.cn(symb, coord, ndx1, n, m, d, ndx2=[])[source]
metafalcon.cvs.cvfunctions.check_cn_parameters(n=6, m=12, d=1.0)[source]

Plot the coordination number against the distance between two atoms.

Parameters:
  • n (int) – first exponent
  • m (int) – second exponent
  • d (float) – distance threshold in angstrom
metafalcon.cvs.cvfunctions.wiener(symbols, coords, exclude_h=True)[source]

metafalcon.cvs.energygap module

Contains a class for using the energy gap between two electronic states as a CV.

class metafalcon.cvs.energygap.cv_energygap(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Energy gap between two states as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • state1 (int) – index of first electronic state (ground state = 0)
  • state2 (int) – index of second electronic state (ground state = 0)
  • do_multistate (bool) – whether to use this CV for multistate metadynamics (default: False)
initialize()[source]
set_s_and_ds(coords)[source]

Calculate energy gap and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.firsteigenvalue module

Contains a class for using the lowest eigenvalue of the geometric distance matrix as a CV.

class metafalcon.cvs.firsteigenvalue.cv_firsteigenvalue(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Lowest eigenvalue of the distance matrix as CV, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

exclude_h (bool) – do not include distances to hydrogen atoms (default: False)

get_distancematrix(coords)[source]

Return the geometrical distance matrix.

Parameters:coords (np.2darray (shape: (N, 3))) – atomic xyz-coordinates of the molecule (bohr)
Returns:dm – geometrical distance matrix
Return type:np.2darray (shape: (N, N))
get_derivative_eigenvalue(e, v, k)[source]

Return the derivative of the k-th eigenvalue with respect to distance matrix.

Parameters:
  • e (np.array) – eigenvalues (shape: (N))
  • v (np.2darray) – eigenvectors (shape: (N, N))
  • k (int) – index of the eigenvalue to by differentiated
Returns:

de_dd – derivative of eigenvalue k wrt distance matrix (shape: (N, N))

Return type:

np.2darray

set_s_and_ds(coords)[source]

Calculate first eigenvalue and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.mullcharge module

Contains a class for using the Mulliken charge as a CV.

class metafalcon.cvs.mullcharge.cv_mullcharge(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Mulliken charge as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • atoms (list of int) – list of three atom indices for the calculation of the angle
  • iface (str) – interface to QC code
  • method (str) – ‘analytic’ or ‘numeric’ derivatives
  • nproc (int) – number of processors to be used for numeric differentiation
check_ridft()[source]

Check if a ridft-calculation is performed.

set_dftb_object(dftb)[source]

Set the DFTB.PES.PotentialEnergySurfaces object.

set_s_and_ds(coords)[source]

Calculate Mulliken charge and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.mulliken module

Contains a class for calculation of Mulliken charges from Turbomole oder DFTBaby outputs.

class metafalcon.cvs.mulliken.mulliken(symbols=None)[source]
set_symbols()[source]

get atom symbols

set_S()[source]

get overlap matrix S from tm.out

get_coefficients(mofile)[source]
get_D()[source]

take MO coefficients from mos file and calculate density matrix D

get_D_os()[source]

take MO coefficients from mos file and calculate density matrix D

set_order()[source]

set order of basis functions

get_mulliken_charges()[source]

calculate mulliken charges from D and S

metafalcon.cvs.mulliken.do_dft_calculation(symbols, coord)[source]
metafalcon.cvs.mulliken.get_charges(symbols=None)[source]

Calculate Mulliken charges from Turbomole ridft calculations.

Files mos (alpha, beta) and tm.out are needed in the execution directory. Please include the keyword “$intsdebug cao” in the control file to print out the overlap matrix. “$scfconv” should be increased to raise the accuracy of MO coefficients. With the default $scfconv=6, charges can be obtained much faster directly from Turbomole in similar accuracy.

Parameters:symbols (list of strings (optional)) – if symbols are not passed, they are extracted from the coord file
Returns:charges – Mulliken charges, shape (nat)
Return type:numpy array

Note

This program does not work with Turbomole 6.4, because the overlap matrix is not printed.

metafalcon.cvs.mulliken.get_new_charges_tm(args)[source]
metafalcon.cvs.mulliken.get_new_charges_dftb(args)[source]

metafalcon.cvs.noon module

Contains a class for using a Natural Orbital Occupation Number (NOON) as a CV.

class metafalcon.cvs.noon.cv_noon(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

NOON as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • no_index (int) – index of natural orbital (sorted by rising occupation number (0 = lowest occupation)
  • nstates (int) – number of electronic states -(default: 1)
  • state (int) – electronic state index (default: 0)
  • nproc (int) – number of parallel processes for the calculation of numerical derivatives (default: 1)
  • iface (str) – interface to QC code
initialize()[source]
get_noon(qcout=None)[source]
get_dnoon_numerical(coords, h=0.01)[source]
set_s_and_ds(coords)[source]

Calculate noon and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))
metafalcon.cvs.noon.get_norbitals_molpro()[source]
metafalcon.cvs.noon.get_coefficients_molpro(norbs, molproout)[source]
metafalcon.cvs.noon.get_overlap_molpro(norb, molproout)[source]
metafalcon.cvs.noon.get_coefficients_ortho(C, S)[source]
metafalcon.cvs.noon.get_coefficients_deortho(C_prime, S)[source]
metafalcon.cvs.noon.get_population_molpro(molproout)[source]
metafalcon.cvs.noon.get_orbitals_molproxml(xml)[source]
metafalcon.cvs.noon.getNatPop(nstates, norb, qcout, iface='molpro')[source]

Get NOONs and NO coefficients.

metafalcon.cvs.noon.run_molpro((step, i, symbols, coords))[source]

metafalcon.cvs.noongap module

Contains a class for using the energy gap between two electronic states as a CV.

class metafalcon.cvs.noongap.cv_noongap(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

NOON gap as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • no_index1 (int) – index of first NOON (close to 0)
  • no_index2 (int) – index of second NOON (close to 2)
  • nstates (int) – number of electronic states -(default: 1)
  • state (int) – electronic state index (default: 0)
  • nproc (int) – number of parallel processes for the calculation of numerical derivatives (default: 1)
  • do_multistate (bool) – whether to use this CV for multistate metadynamics (default: False)
initialize()[source]
get_noon(index, qcout=None)[source]
get_dnoon_numerical(index, s_current, coords, h=0.01)[source]
set_s_and_ds(coords)[source]

Calculate NOON gap and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))
metafalcon.cvs.noongap.get_norbitals_molpro()[source]
metafalcon.cvs.noongap.get_coefficients_molpro(norbs, molproout)[source]
metafalcon.cvs.noongap.get_overlap_molpro(norb, molproout)[source]
metafalcon.cvs.noongap.get_coefficients_ortho(C, S)[source]
metafalcon.cvs.noongap.get_population_molpro(molproout)[source]
metafalcon.cvs.noongap.get_orbitals_molproxml(xml)[source]
metafalcon.cvs.noongap.getNatPop(nstates, norb, qcout, iface='molpro')[source]

Get NOONs and NO coefficients.

metafalcon.cvs.noongap.run_molpro((step, i, symbols, coords))[source]

metafalcon.cvs.shortestbond module

Contains a class for using the shortest bond length to a group of atoms as a CV.

class metafalcon.cvs.shortestbond.cv_shortestbond(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Shortest bond length between pairs of atoms as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 
  • atom1 (int) – fixed atom index for the calculation of the bond length
  • atom2 (list of int) – list of atom indices to be used as second atoms for the calculation of the bond length
set_s_and_ds(coords)[source]

Calculate bond length and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.torsion module

Contains a class for using the torsion angle between four atoms as a CV.

class metafalcon.cvs.torsion.cv_torsion(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

Torsion angle between four atoms as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

atoms (list of int) – list of four atom indices for the calculation of the torsion angle

set_s_and_ds(coords)[source]

Calculate torsion angle and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))

metafalcon.cvs.types module

Definition of CV types. For the registration of a new CV, import it and append it to the dict.

metafalcon.cvs.wiener module

Contains a class for using the 3D Wiener number as a CV.

class metafalcon.cvs.wiener.cv_wiener(idx, symbols, **kwargs)[source]

Bases: metafalcon.cvs.cv.cv

3D Wiener number as collective variable, inherits from metafalcon.cvs.cv.cv.

Parameters:
  • idx (int) – index of collective variable in the input file
  • symbols (list of str) – atomic symbols of the molecule
  • **kwargs – See below
Keyword Arguments:
 

exclude_h (bool) – do not include distances to hydrogen atoms (default: False)

set_s_and_ds(coords)[source]

Calculate Wiener number and its gradient for the current set of coordinates.

Parameters:coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))
metafalcon.cvs.wiener.get_wiener(symbols, coords, exclude_h=True)[source]

Return Wiener number.

Parameters:
  • coords (np.2darray) – cartesian coordinates of the molecule (shape: (N, 3))
  • exclude_h (bool) – do not include distances to hydrogen atoms (default: False)
Returns:

wiener – Wiener number

Return type:

float

Module contents

Subpackage of metafalcon that contains a number of CVs to be used in metadynamics simulations.