Simpatico  v1.10
List of all members | Public Member Functions | Protected Member Functions
McMd::LinearGenerator Class Reference

Detailed Description

Generates random configurations for linear molecules.

Definition at line 34 of file LinearGenerator.h.

#include <LinearGenerator.h>

Inheritance diagram for McMd::LinearGenerator:
McMd::Generator

Public Member Functions

 LinearGenerator (Species &species, System &system)
 Constructor. More...
 
- Public Member Functions inherited from McMd::Generator
 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...
 
- Protected Member Functions inherited from McMd::Generator
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 Speciesspecies ()
 Get the associated Species by reference. More...
 
Simulationsimulation ()
 Get the associated Simulation by reference. More...
 
Systemsystem ()
 Get the associated System by reference. More...
 
const Boundaryboundary () const
 Get the associated Boundary by reference. More...
 
const BondPotentialbondPotential ()
 Get the associated BondPotential by reference. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from McMd::Generator
static void setupCellList (int atomCapacity, Boundary &boundary, const Array< double > &diameters, CellList &cellList)
 Allocate any required memory for the cell list. More...
 

Constructor & Destructor Documentation

McMd::LinearGenerator::LinearGenerator ( Species species,
System system 
)

Constructor.

Parameters
speciesmolecular Species to be generated
systemparent System object

Definition at line 24 of file LinearGenerator.cpp.

Member Function Documentation

bool McMd::LinearGenerator::attemptPlaceMolecule ( Molecule molecule,
Array< double > const &  diameters,
CellList cellList 
)
protected

Attempt to place an entire linear chain.

If successful, all atoms are added to the CellList. If unsuccesful, CellList is unchanged.

Parameters
moleculereference to Molecule object
diametersarray of hard-core exclusion diameters
cellListCellList object, modified if successful.
Returns
true for success, false for failure

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().


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