Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
position_restraints.cpp File Reference
#include "gmxpre.h"
#include "position_restraints.h"
#include <cassert>
#include <cmath>
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/functions.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/enerdata.h"
#include "gromacs/mdtypes/forceoutput.h"
#include "gromacs/mdtypes/forcerec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/idef.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/fatalerror.h"
+ Include dependency graph for position_restraints.cpp:

Description

This file defines low-level functions necessary for computing energies and forces for position restraints.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Functions

void anonymous_namespace{position_restraints.cpp}::posres_dx (const rvec x, const rvec pos0A, const rvec pos0B, const rvec comA_sc, const rvec comB_sc, real lambda, const t_pbc *pbc, int refcoord_scaling, int npbcdim, rvec dx, rvec rdist, rvec dpdl)
 returns dx, rdist, and dpdl for functions posres() and fbposres()
 
real anonymous_namespace{position_restraints.cpp}::do_fbposres_cylinder (int fbdim, rvec fm, rvec dx, real rfb, real kk, gmx_bool bInvert)
 Computes forces and potential for flat-bottom cylindrical restraints. Returns the flat-bottom potential.
 
real anonymous_namespace{position_restraints.cpp}::fbposres (int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], gmx::ForceWithVirial *forceWithVirial, const t_pbc *pbc, int refcoord_scaling, int ePBC, const rvec com)
 Compute energies and forces for flat-bottomed position restraints. More...
 
template<bool computeForce>
real anonymous_namespace{position_restraints.cpp}::posres (int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], gmx::ForceWithVirial *forceWithVirial, const struct t_pbc *pbc, real lambda, real *dvdlambda, int refcoord_scaling, int ePBC, const rvec comA, const rvec comB)
 Compute energies and forces, when requested, for position restraints. More...
 
void posres_wrapper (t_nrnb *nrnb, const t_idef *idef, const struct t_pbc *pbc, const rvec *x, gmx_enerdata_t *enerd, const real *lambda, const t_forcerec *fr, gmx::ForceWithVirial *forceWithVirial)
 Helper function that wraps calls to posres.
 
void posres_wrapper_lambda (struct gmx_wallcycle *wcycle, const t_lambda *fepvals, const t_idef *idef, const struct t_pbc *pbc, const rvec x[], gmx_enerdata_t *enerd, const real *lambda, const t_forcerec *fr)
 Helper function that wraps calls to posres for free-energy pertubation.
 
void fbposres_wrapper (t_nrnb *nrnb, const t_idef *idef, const struct t_pbc *pbc, const rvec *x, gmx_enerdata_t *enerd, const t_forcerec *fr, gmx::ForceWithVirial *forceWithVirial)
 Helper function that wraps calls to fbposres for free-energy perturbation.