11 #include <util/param/ParamComposite.h> 12 #include <util/containers/DArray.h> 13 #include <util/containers/FSArray.h> 14 #include <simp/species/SpeciesGroup.h> 173 std::string
indent = std::string());
219 const AtomBondIdArray&
atomBondIds(
int atomId)
const;
454 void makeBond(
int bondId,
int atomId1,
int atomId2,
int bondType);
477 void makeAngle(
int angleId,
int atomId1,
int atomId2,
int atomId3,
500 void makeDihedral(
int dihedralId,
int atomId1,
int atomId2,
int atomId3,
501 int atomId4,
int dihedralType);
619 {
return atomBondIdArrays_[atomId]; }
641 {
return atomAngleIdArrays_[atomId]; }
665 {
return atomDihedralIdArrays_[atomId]; }
672 {
return (mutatorPtr_ != 0); }
void setAtomType(int atomId, int atomType)
Set the type for one atom in a generic molecule of this Species.
SpeciesGroup< 3 > SpeciesAngle
A SpeciesAngle has local atom ids and a type id for one angle.
const AtomDihedralIdArray & atomDihedralIds(int atomId) const
Get array of ids for dihedrals that contain one Atom.
const SpeciesDihedral & speciesDihedral(int iDihedral) const
Get a specific SpeciesDihedral object, by local angle index.
A Group of covalently interacting atoms within any molecule of one Species.
static const int MaxBondPerAtom
Maximum number of bonds that can be connected to one atom.
static const int MaxDihedralPerAtom
Maximum number of dihedral groups that can contain one atom.
int nAtom() const
Get number of atoms per molecule for this Species.
int moleculeCapacity_
Number of molecules associated with the species.
DArray< SpeciesDihedral > speciesDihedrals_
Array of SpeciesDihedrals, indexed by local dihedral id.
SpeciesGroup< 4 > SpeciesDihedral
A SpeciesDihedral has local atom ids and a type id for one dihedral.
void setMutatorPtr(McMd::SpeciesMutator *mutatorPtr)
Set pointer to associated McMd::SpeciesMutator for a mutable species.
void writeStructure(std::ostream &out, std::string indent=std::string())
Write molecular structure in config/topology file format.
static const int MaxAnglePerAtom
Maximum number of angles groups that can contain one atom.
DArray< SpeciesBond > speciesBonds_
Array of SpeciesBonds for all bonds, indexed by local bond id.
FSArray< int, MaxAnglePerAtom > AtomAngleIdArray
An array of local angle ids for all angles containing one atom.
virtual void readSpeciesParam(std::istream &in)
Define chemical structure for this Species.
virtual ~Species()
Destructor.
void allocateAtoms()
Allocate and initialize array of atom type Ids.
Classes used by all simpatico molecular simulations.
Mix-in class for mutable subclasses of Species.
void allocateDihedrals()
Allocate arrays associated with dihedrals.
static const int NullIndex
Null (unknown) value for any non-negative index.
int nAtom_
Number of atoms per molecule.
Saving / output archive for binary ostream.
DArray< int > atomTypeIds_
Array of atom type Ids, indexed by local atom id.
const SpeciesBond & speciesBond(int iBond) const
Get a specific SpeciesBond object, by local bond index.
A fixed capacity (static) contiguous array with a variable logical size.
int nDihedral() const
Get number of dihedrals per molecule for this Species.
const AtomAngleIdArray & atomAngleIds(int atomId) const
Get array of ids for angles that contain one Atom.
DArray< SpeciesAngle > speciesAngles_
Array of SpeciesAngles for all angles, indexed by local angle id.
void makeDihedral(int dihedralId, int atomId1, int atomId2, int atomId3, int atomId4, int dihedralType)
Add a dihedral to the chemical structure of a generic molecule.
FSArray< int, MaxDihedralPerAtom > AtomDihedralIdArray
An array of local angle ids for all dihedrals containing one atom.
Utility classes for scientific computation.
SpeciesGroup< 2 > SpeciesBond
A SpeciesBond has the local atom ids and a type id for one bond.
const SpeciesAngle & speciesAngle(int iAngle) const
Get a specific SpeciesAngle object, by local angle index.
bool matchStructure(std::istream &in)
Read structure, return true iff it matches existing structure.
int nDihedral_
Number of dihedrals per molecule.
int atomTypeId(int iAtom) const
Get atom type index for a specific atom, by local atom index.
int nAngle_
Number of angles per molecule.
bool isValid() const
Return true if Species is valid, or throw an Exception.
virtual void readParameters(std::istream &in)
Read parameters and initialize structure for this species.
void makeBond(int bondId, int atomId1, int atomId2, int bondType)
Add a bond to the chemical structure of a generic molecule.
void setId(int id)
Set integer id for this Species.
void allocateBonds()
Allocate arrays associated with Bonds.
int id_
Integer index for this Species.
int id() const
Get integer id of this Species.
Saving archive for binary istream.
void makeAngle(int angleId, int atomId1, int atomId2, int atomId3, int angleType)
Add an angle to the chemical structure of a generic molecule.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
void readStructure(std::istream &in)
Read structure from config/topology file format.
bool isMutable() const
Is this a mutable Species?
const AtomBondIdArray & atomBondIds(int atomId) const
Get array of ids for Bonds that contain one Atom.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
virtual void loadSpeciesParam(Serializable::IArchive &ar)
Define chemical structure for this Species.
int capacity() const
Maximum allowed number of molecules for this Species.
void allocate()
Allocate chemical structure arrays.
An object that can read multiple parameters from file.
McMd::SpeciesMutator & mutator()
Return the species mutator object by reference.
A Species represents a set of chemically similar molecules.
int nBond() const
Get number of bonds per molecule for this Species.
int nAngle() const
Get number of angles per molecule for this Species.
std::string indent() const
Return indent string for this object (string of spaces).
int nBond_
Number of bonds per molecule.
void initializeAtomGroupIdArrays()
Initialize all atom groupId arrays (point from atoms to groups).
FSArray< int, MaxBondPerAtom > AtomBondIdArray
An array of local integer bond ids for all bonds containing one atom.
void allocateAngles()
Allocate arrays associated with angles.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.