Gromacs
2024.3
|
#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/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/fatalerror.h"
This file defines low-level functions necessary for computing energies and forces for position restraints.
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, RefCoordScaling 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, RefCoordScaling refcoord_scaling, PbcType pbcType, 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, RefCoordScaling refcoord_scaling, PbcType pbcType, const rvec comA, const rvec comB) |
Compute energies and forces, when requested, for position restraints. More... | |
void | posres_wrapper (t_nrnb *nrnb, const InteractionDefinitions &idef, const struct t_pbc *pbc, const rvec *x, gmx_enerdata_t *enerd, gmx::ArrayRef< 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 InteractionDefinitions &idef, const struct t_pbc *pbc, const rvec x[], gmx_enerdata_t *enerd, gmx::ArrayRef< 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 InteractionDefinitions &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. | |