Simpatico
v1.10
|
Generates random configurations for linear molecules.
Definition at line 34 of file LinearGenerator.h.
#include <LinearGenerator.h>
Public Member Functions | |
LinearGenerator (Species &species, System &system) | |
Constructor. More... | |
![]() | |
Generator (Species &species, System &system) | |
Constructor. More... | |
virtual | ~Generator () |
Destructor. More... | |
void | setBondPotential (BondPotential &bondPotential) |
Create an association with a BondPotential. More... | |
virtual bool | generate (int nMolecule, Array< double > const &diameters, CellList &cellList) |
Generate nMolecule molecules of the associated Species. More... | |
Protected Member Functions | |
bool | attemptPlaceMolecule (Molecule &molecule, Array< double > const &diameters, CellList &cellList) |
Attempt to place an entire linear chain. More... | |
![]() | |
bool | attemptPlaceAtom (Atom &atom, const Array< double > &diameters, CellList &cellList) |
Attempt to place an atom. More... | |
virtual bool | attemptPlaceMolecule (Molecule &molecule, const Array< double > &diameters, CellList &cellList)=0 |
Attempt to insert an entire molecule (pure virtual). More... | |
const Species & | species () |
Get the associated Species by reference. More... | |
Simulation & | simulation () |
Get the associated Simulation by reference. More... | |
System & | system () |
Get the associated System by reference. More... | |
const Boundary & | boundary () const |
Get the associated Boundary by reference. More... | |
const BondPotential & | bondPotential () |
Get the associated BondPotential by reference. More... | |
Additional Inherited Members | |
![]() | |
static void | setupCellList (int atomCapacity, Boundary &boundary, const Array< double > &diameters, CellList &cellList) |
Allocate any required memory for the cell list. More... | |
Constructor.
species | molecular Species to be generated |
system | parent System object |
Definition at line 24 of file LinearGenerator.cpp.
|
protected |
Attempt to place an entire linear chain.
If successful, all atoms are added to the CellList. If unsuccesful, CellList is unchanged.
molecule | reference to Molecule object |
diameters | array of hard-core exclusion diameters |
cellList | CellList object, modified if successful. |
Definition at line 32 of file LinearGenerator.cpp.
References McMd::Molecule::atom(), McMd::Generator::attemptPlaceAtom(), McMd::Generator::bondPotential(), McMd::Generator::boundary(), McMd::CellList::deleteAtom(), Simp::Species::nAtom(), McMd::Atom::position(), McMd::Simulation::random(), McMd::BondPotential::randomBondLength(), Simp::OrthorhombicBoundary::randomPosition(), McMd::Generator::simulation(), McMd::Generator::species(), and Util::Random::unitVector().