ParM  parm
A molecular dynamics library
Public Member Functions | Protected Attributes | List of all members
SubGroup Class Reference

#include <box.hpp>

Inheritance diagram for SubGroup:

Public Member Functions

 SubGroup (sptr< AtomVec > atoms)
AtomVecvec ()
Atomoperator[] (cuint n)
Atomoperator[] (cuint n) const
Atomget (cuint n)
void add (AtomID a)
AtomID get_id (cuint n)
uint size () const
 Number of atoms in the group. More...
- Public Member Functions inherited from AtomGroup
virtual AtomIter begin ()
 For use in a for loop. More...
virtual AtomIter end ()
Vec com () const
 center of mass More...
Vec com_force () const
 center of mass force (i.e., sum of all forces) More...
Vec com_velocity () const
 center of mass velocity More...
flt mass () const
 Mass of the whole group. More...
flt kinetic_energy (const Vec originvelocity=Vec::Zero()) const
 Total kinetic_energy energy of the group. More...
Vec momentum () const
 Total momentum. More...
flt gyradius () const
 \(R_g\) More...
Vec torque (const Vec loc) const
 Total torque about a given location. More...
Vec torque () const
flt moment_about (const Vec axis, const Vec loc) const
 Moment of inertia of the atoms about an axis. More...
flt moment_about (const Vec axis) const
Vec angular_momentum (const Vec loc) const
 Angular momentum. More...
Vec angular_momentum () const
Matrix moment (const Vec loc) const
 Moment of inertia of the atoms as a whole. More...
Matrix moment () const
Vec omega (const Vec loc) const
 Angular velocity. More...
Vec omega () const
void add_omega (Vec w, Vec origin)
 Add a given angular velocity to all atoms, by adding to their velocity. More...
void add_omega (Vec w)
void reset_L ()
 Reset angular momentum to 0. More...
void add_velocity (Vec v)
 for resetting. Adds a fixed velocity to all atoms More...
void reset_com_velocity ()
 Subtracts the center of mass velocity from all atoms. More...
void randomize_velocities (flt T)
 Randomize velocities, for a specific temperature. More...
void reset_forces ()
 for timestepping More...
virtual ~AtomGroup ()

Protected Attributes

sptr< AtomVecatoms
vector< AtomIDids

Detailed Description

A class for representing any grouping of atoms that is not the whole set of atoms, such as a molecule, a side-chain, etc.

Constructor & Destructor Documentation

SubGroup::SubGroup ( sptr< AtomVec atoms)

Member Function Documentation

void SubGroup::add ( AtomID  a)
Atom& SubGroup::get ( cuint  n)

Reimplemented from AtomGroup.

AtomID SubGroup::get_id ( cuint  n)

Implements AtomGroup.

Atom& SubGroup::operator[] ( cuint  n)

Implements AtomGroup.

Atom& SubGroup::operator[] ( cuint  n) const

Implements AtomGroup.

uint SubGroup::size ( ) const

Number of atoms in the group.

Implements AtomGroup.

AtomVec& SubGroup::vec ( )

Implements AtomGroup.

Member Data Documentation

sptr<AtomVec> SubGroup::atoms
vector<AtomID> SubGroup::ids

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