Pteros  2.0
Molecular modeling library for human beings!
pteros::Force_field Class Reference

Force field parameters of the system. More...

#include <force_field.h>

Public Member Functions

 Force_field ()
 Force_field (const Force_field &other)
 Copy constructor.
Force_fieldoperator= (Force_field other)
 Assignment operator.
void clear ()
void setup_kernels ()
float LJ_en_kernel (float C6, float C12, float r)
float LJ_en_kernel_cutoff (float C6, float C12, float r)
float LJ_en_kernel_shifted (float C6, float C12, float r)
float Coulomb_en_kernel (float q1, float q2, float r)
float Coulomb_en_kernel_rf (float q1, float q2, float r)
float Coulomb_en_kernel_shifted (float q1, float q2, float r)
float Coulomb_en_kernel_cutoff (float q1, float q2, float r)

Public Attributes

std::vector< Eigen::Vector2i > charge_groups
 Charge groups. Currently not used and could be deleted later.
std::vector< std::unordered_set< int > > exclusions
 Exclusions. More...
Eigen::MatrixXf LJ_C6
 Matrices of normal (not excluded, not 1-4) LJ interactions. More...
Eigen::MatrixXf LJ_C12
std::vector< Eigen::Vector2f > LJ14_interactions
 The list of distinct types of LJ14 interactions in the format [C6,C12].
std::unordered_map< int, int > LJ14_pairs
 The list of LJ14 pairs. More...
float fudgeQQ
 Scaling factor of 1-4 Coulomb interactions.
float rcoulomb
float epsilon_r
float epsilon_rf
float rcoulomb_switch
float rvdw_switch
float rvdw
std::string coulomb_type
std::string coulomb_modifier
std::string vdw_type
std::string vdw_modifier
std::vector< Eigen::Vector2i > bonds
 Topology-related infromation.
bool ready
 Is the force field properly set up?
std::function< float(float, float, float)> coulomb_kernel_ptr
 Pointer to chosen coulomb kernel.
std::function< float(float, float, float)> LJ_kernel_ptr
 Pointer to chosen VDW kernel.
float coulomb_prefactor
float k_rf
float c_rf
Eigen::Vector3f shift_1
Eigen::Vector3f shift_6
Eigen::Vector3f shift_12

Detailed Description

Force field parameters of the system.

MD packages usually separate topology and force filed i.e. interaction parameters and chemical identity and connectivity (bonds, angles, atom types, etc). This doesn't make much sense since atom types are part of particular force field and at the same time part of chemical identity, etc. In Pteros the force field is all information, which is needed to compute interactomic energies and forces in addition to what is stored already in Atom.

Atom already contains the following information: mass, charge, type and type_name. All the rest is stored in this class.

Member Data Documentation

std::vector<std::unordered_set<int> > pteros::Force_field::exclusions


The storage order is: (atom)–>[i1,i2,] which means that all interactions (atom:i1), (atom:i2) ... (atom:in) are excluded If atom has no exclusions the set is empty

Eigen::MatrixXf pteros::Force_field::LJ_C6

Matrices of normal (not excluded, not 1-4) LJ interactions.

The size of the matrix == the number of distinct LJ types. The types themselves are stored in Atom.type Matrices are symmetric.

std::unordered_map<int,int> pteros::Force_field::LJ14_pairs

The list of LJ14 pairs.

Each (a,b) pair is encoded as (a*LJ14_interactions.size()+b) There is a mapping: (a*LJ14_interactions.size()+b) –> LJ14_interaction

The documentation for this class was generated from the following files: