1 #ifndef DDMD_ATOM_STORAGE_H 2 #define DDMD_ATOM_STORAGE_H 11 #include <util/param/ParamComposite.h> 13 #include <ddMd/chemistry/AtomArray.h> 14 #include <ddMd/storage/AtomMap.h> 15 #include <ddMd/communicate/AtomDistributor.h> 16 #include <ddMd/communicate/AtomCollector.h> 17 #include <ddMd/chemistry/Atom.h> 18 #include <ddMd/chemistry/Group.h> 19 #include <simp/boundary/Boundary.h> 20 #include <util/containers/DArray.h> 21 #include <util/containers/ArraySet.h> 22 #include <util/containers/ArrayStack.h> 23 #include <util/misc/Setable.h> 26 class AtomStorageTest;
32 class ConstAtomIterator;
34 class ConstGhostIterator;
77 void initialize(
int atomCapacity,
int ghostCapacity,
78 int totalAtomCapacity);
92 virtual void readParameters(std::istream& in);
102 void zeroForces(
bool zeroGhosts);
189 Atom* addAtom(
int id);
198 void removeAtom(
Atom* atomPtr);
213 int atomCapacity()
const;
268 Atom* addGhost(
int id);
277 void removeGhost(
Atom* atomPtr);
292 int ghostCapacity()
const;
305 void transformCartToGen(
const Boundary& boundary);
314 void transformGenToCart(
const Boundary& boundary);
319 bool isCartesian()
const;
340 void clearSnapshot();
350 double maxSqDisplacement();
395 int totalAtomCapacity()
const;
417 void computeNAtomTotal(MPI::Intracomm& communicator);
427 int nAtomTotal()
const;
436 void unsetNAtomTotal();
468 bool isInitialized()
const;
473 bool isValid()
const;
481 bool isValid(MPI::Intracomm& communicator)
const;
494 virtual void computeStatistics(MPI::Intracomm& communicator);
496 virtual void computeStatistics();
502 void clearStatistics();
511 void outputStatistics(std::ostream& out);
518 int maxNAtom()
const;
525 int maxNGhost()
const;
568 int totalAtomCapacity_;
605 friend class ::AtomStorageTest;
612 {
return atomSet_.size(); }
615 {
return ghostSet_.size(); }
619 {
return distributor_; }
622 {
return collector_; }
626 {
return atomCapacity_; }
629 {
return ghostCapacity_; }
632 {
return totalAtomCapacity_; }
635 {
return isCartesian_; }
646 return nAtomTotal_.value();
648 return atomSet_.size();
int nAtomTotal() const
Get total number of atoms on all processors.
AtomDistributor & distributor()
Get the AtomDistributor by reference.
An orthorhombic periodic unit cell.
Associative container for finding atoms identified by integer id.
File containing preprocessor macros for error handling.
A point particle in an MD simulation.
Parallel domain decomposition (DD) MD simulation.
Classes used by all simpatico molecular simulations.
int nAtom() const
Return number of local atoms on this procesor (excluding ghosts)
AtomCollector & collector()
Get the AtomCollector by reference.
Saving / output archive for binary ostream.
Class for collecting Atoms from processors to master processor.
An array of Atom objects.
int nGhost() const
Return current number of ghost atoms on this processor.
A container for pointers to a subset of elements of an associated array.
Const iterator for all atoms owned by an AtomStorage.
Utility classes for scientific computation.
const AtomMap & map() const
Return the AtomMap by const reference.
A stack of fixed capacity.
A container for all the atoms and ghost atoms on this processor.
int atomCapacity() const
Return capacity for local atoms on this processor (excluding ghosts).
int totalAtomCapacity() const
Return maximum number of atoms on all processors.
Buffer for interprocessor communication.
Decomposition of the system into domains associated with processors.
Dynamically allocatable contiguous array template.
Saving archive for binary istream.
int ghostCapacity() const
Return capacity for ghost atoms on this processor.
bool isCartesian() const
Are atom coordinates Cartesian (true) or generalized (false)?
Iterator for all ghost atoms owned by an AtomStorage.
An object that can read multiple parameters from file.
Iterator for all atoms owned by an AtomStorage.
Iterator for all ghost atoms owned by an AtomStorage.
Class for distributing Atoms among processors.