8 #include "DeformCommand.h" 9 #include <mcMd/simulation/Simulation.h> 10 #include <mcMd/simulation/System.h> 42 Vector cartPosition, genPosition;
44 for (
int iSpec=0; iSpec < nSpecies; ++iSpec) {
45 begin(iSpec, molIter);
46 for ( ; molIter.
notEnd(); ++molIter) {
47 molIter->begin(atomIter);
48 for ( ; atomIter.
notEnd(); ++atomIter) {
49 cartPosition = atomIter->position();
51 atomIter->position() = genPosition;
62 for (
int iSpec=0; iSpec < nSpecies; ++iSpec) {
63 begin(iSpec, molIter);
64 for ( ; molIter.
notEnd(); ++molIter) {
65 molIter->begin(atomIter);
66 for ( ; atomIter.
notEnd(); ++atomIter) {
67 genPosition = atomIter->position();
69 atomIter->position() = cartPosition;
A Vector is a Cartesian vector.
An interface to a System.
bool notEnd() const
Is the current pointer not at the end of the array?
A set of interacting Molecules enclosed by a Boundary.
Simulation & simulation() const
Get the parent Simulation by reference.
bool notEnd() const
Is the current pointer not at the end of the PArray?
Utility classes for scientific computation.
Command is an object that can be invoked from the command script.
Forward iterator for an Array or a C array.
Forward iterator for a PArray.
void transformGenToCart(const Vector &Rg, Vector &Rc) const
Transform Vector of generalized coordinates to Cartesian Vector.
static std::ostream & file()
Get log ostream by reference.
void begin(int speciesId, System::MoleculeIterator &iterator)
Initialize an iterator for molecules of one species in this SystemInterface.
Boundary & boundary() const
Get the Boundary by reference.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
int nSpecies() const
Get the number of Species in this Simulation.
void setClassName(const char *className)
Set class name string.
Boundary & boundary() const
Get the Boundary by reference.
System & system() const
Get the parent System by reference.
void transformCartToGen(const Vector &Rc, Vector &Rg) const
Transform Cartesian Vector to scaled / generalized coordinates.