faunus
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
Faunus::MoleculeData Class Reference

General properties for molecules. More...

#include <molecule.h>

Collaboration diagram for Faunus::MoleculeData:
Collaboration graph
[legend]

Public Types

using index_type = int
 

Public Member Functions

index_type & id ()
 Type id.
 
const index_type & id () const
 Type id.
 
void createMolecularConformations (const json &j)
 Add conformations if appropriate.
 
void setConformationWeights (const json &j)
 Add weights for conformations.
 
size_t numConformations () const
 Number of conformations.
 
 MoleculeData (const std::string &name, const ParticleVector &particles, const BasePointerVector< pairpotential::BondData > &bonds)
 
bool isImplicit () const
 Is molecule implicit and explicitly absent from simulation cell?
 
bool isPairExcluded (int i, int j) const
 
bool isMolecular () const
 
bool isAtomic () const
 
void setInserter (std::shared_ptr< MoleculeInserter > ins)
 Specify function to be used when inserting into space. More...
 
ParticleVector getRandomConformation (Geometry::GeometryBase &geo, const ParticleVector &otherparticles=ParticleVector())
 Get random conformation that fits in container. More...
 

Public Attributes

std::shared_ptr< MoleculeInserterinserter = nullptr
 Functor for insertion into space.
 
std::string name
 Molecule name.
 
bool atomic = false
 True if atomic group (salt etc.)
 
bool compressible
 True if compressible group (scales internally upon volume change) More...
 
bool rigid = false
 True if particle should be considered as rigid.
 
double activity = 0.0
 Chemical activity (mol/l)
 
std::vector< AtomData::index_type > atoms
 Sequence of atoms in molecule (atom id's)
 
BasePointerVector< pairpotential::BondDatabonds
 
WeightedDistribution< ParticleVectorconformations
 Conformations of molecule.
 

Protected Attributes

ExclusionsVicinity exclusions
 Implementation of isPairExcluded; various implementation can be provided in the future.
 

Friends

class MoleculeBuilder
 
void to_json (json &j, const MoleculeData &a)
 
void from_json (const json &j, MoleculeData &a)
 

Detailed Description

General properties for molecules.

Member Function Documentation

◆ getRandomConformation()

ParticleVector Faunus::MoleculeData::getRandomConformation ( Geometry::GeometryBase geo,
const ParticleVector otherparticles = ParticleVector() 
)

Get random conformation that fits in container.

Parameters
geoGeometry
otherparticlesTypically spc.p is insertion depends on other particle

By default the molecule is placed at a random position and orientation with no container overlap using the RandomInserter class. This behavior can be changed by specifying another inserter using setInserter().

◆ setInserter()

void Faunus::MoleculeData::setInserter ( std::shared_ptr< MoleculeInserter ins)

Specify function to be used when inserting into space.

By default a random position and orientation is generator and overlap with container is avoided.

Member Data Documentation

◆ compressible

bool Faunus::MoleculeData::compressible
Initial value:
=
false

True if compressible group (scales internally upon volume change)


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