ParM
parm
A molecular dynamics library
|
#include <collection.hpp>
Public Member Functions | |
Collection (sptr< Box > box, sptr< AtomGroup > atoms, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >(), bool should_initialize=true) | |
virtual void | initialize () |
virtual void | set_forces (bool constraints_and_a=true) |
Set forces. More... | |
virtual void | timestep ()=0 |
Take one step forward in time. More... | |
flt | degrees_of_freedom () |
Total degrees of freedom. More... | |
flt | potential_energy () |
flt | energy () |
Total energy, including both potential and kinetic_energy. More... | |
virtual flt | temp (bool minuscomv=true) |
virtual flt | kinetic_energy () |
virtual flt | virial () |
virtual flt | pressure () |
Returns (1/d V) Σ ri dot fi where d is number of dimensions note that Interaction->pressure just returns Σ ri dot fi. More... | |
sptr< Box > | get_box () |
Vec | com () |
Vec | com_velocity () |
Vec | angular_momentum (const Vec &loc) |
Shortcut to AtomGroup method of the same name. More... | |
Vec | angular_momentum () |
Shortcut to AtomGroup method of the same name. More... | |
flt | gyradius () |
virtual | ~Collection () |
void | reset_com_velocity () |
Shortcut to AtomGroup method of the same name. More... | |
void | reset_L () |
Shortcut to AtomGroup method of the same name. More... | |
void | scale_velocities (flt scaleby) |
Scale all velocities by a factor. More... | |
void | scale_velocities_to_temp (flt T, bool minuscomv=true) |
Scale all velocities to get to a specific temperature. More... | |
void | scale_velocities_to_energy (flt E) |
Scale all velocities to get to a specific total energy. More... | |
void | add_interaction (sptr< Interaction > inter) |
void | add_tracker (sptr< StateTracker > track) |
void | add_constraint (sptr< Constraint > c) |
void | add (sptr< Interaction > a) |
void | add (sptr< StateTracker > a) |
void | add (sptr< Constraint > a) |
vector< sptr< Interaction > > | get_interactions () |
Protected Member Functions | |
void | update_trackers () |
To be called immediately after setting particle positions and velocities; lets StateTracker instances stay updated automatically. More... | |
void | update_constraint_positions () |
To be called approximately after forces have been set. More... | |
void | update_constraint_velocities () |
void | update_constraint_forces () |
virtual flt | set_forces_get_pressure (bool constraints_and_a=true) |
Protected Attributes | |
sptr< Box > | box |
sptr< AtomGroup > | atoms |
vector< sptr< Interaction > > | interactions |
vector< sptr< StateTracker > > | trackers |
vector< sptr< Constraint > > | constraints |
A "Collection" of atoms, the box, and an integrator. Provides general simulation time-stepping as well as statistical tracking.
The most useful method is timestep(), which takes one step forward in time; this is defined by each subclass separately, as each subclass uses a different integration scheme.
Collection::Collection | ( | sptr< Box > | box, |
sptr< AtomGroup > | atoms, | ||
vector< sptr< Interaction > > | interactions = vector<sptr<Interaction> >() , |
||
vector< sptr< StateTracker > > | trackers = vector<sptr<StateTracker> >() , |
||
vector< sptr< Constraint > > | constraints = vector<sptr<Constraint> >() , |
||
bool | should_initialize = true |
||
) |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Shortcut to AtomGroup
method of the same name.
|
inline |
|
inline |
flt Collection::degrees_of_freedom | ( | ) |
Total degrees of freedom.
This takes into account constraints, and whether the center-of-mass is free.
flt Collection::energy | ( | ) |
Total energy, including both potential and kinetic_energy.
|
inline |
flt Collection::gyradius | ( | ) |
|
virtual |
|
inlinevirtual |
Reimplemented in CollectionGear4NPH, and CollectionNLCG.
flt Collection::potential_energy | ( | ) |
|
virtual |
Returns (1/d V) Σ ri dot fi where d is number of dimensions note that Interaction->pressure just returns Σ ri dot fi.
Reimplemented in CollectionNLCGV, and CollectionNLCG.
|
inline |
Shortcut to AtomGroup
method of the same name.
|
inline |
Shortcut to AtomGroup
method of the same name.
void Collection::scale_velocities | ( | flt | scaleby | ) |
Scale all velocities by a factor.
void Collection::scale_velocities_to_energy | ( | flt | E | ) |
Scale all velocities to get to a specific total energy.
void Collection::scale_velocities_to_temp | ( | flt | T, |
bool | minuscomv = true |
||
) |
Scale all velocities to get to a specific temperature.
|
virtual |
Set forces.
This should be called at the beginning of the simulation, and will also be called by timestep()
Reimplemented in CollectionGear4NPT, CollectionGaussianT, and CollectionNLCG.
|
protectedvirtual |
|
virtual |
Reimplemented in CollectionGear4NPH.
|
pure virtual |
Take one step forward in time.
Implemented in CollectionCDBDgrid, CollectionCDBD, CollectionCDgrid, CollectionCD, CollectionVerletNPT, CollectionGear4NPT, CollectionGear4NPH, CollectionRK4, CollectionGear6A, CollectionGear5A, CollectionGear4A, CollectionGear3A, CollectionGaussianT, CollectionNoseHoover, CollectionNLCGV, CollectionNLCG, CollectionOverdamped, CollectionVerlet, CollectionSolHT, CollectionDamped, CollectionSol, and StaticCollec.
|
protected |
|
protected |
To be called approximately after forces have been set.
Constraints will typically set forces / velocities in some direction to zero, so update_constraints
should be called after all forces have been set, and any external velocity changes have been made.
|
protected |
|
protected |
To be called immediately after setting particle positions and velocities; lets StateTracker
instances stay updated automatically.
|
virtual |
|
protected |
|
protected |
|
protected |