faunus
Public Member Functions | Public Attributes | List of all members
Faunus::RandomInserter Class Reference

Inserts molecules into random positions in the container. More...

#include <molecule.h>

Inheritance diagram for Faunus::RandomInserter:
Inheritance graph
[legend]
Collaboration diagram for Faunus::RandomInserter:
Collaboration graph
[legend]

Public Member Functions

ParticleVector operator() (const Geometry::GeometryBase &geo, MoleculeData &molecule, const ParticleVector &ignored_other_particles=ParticleVector()) override
 
void from_json (const json &j) override
 
void to_json (json &j) const override
 

Public Attributes

Point dir = {1, 1, 1}
 Scalars for random mass center position. Default (1,1,1)
 
Point offset = {0, 0, 0}
 Added to random position. Default (0,0,0)
 
bool rotate = true
 Set to true to randomly rotate molecule when inserted. Default: true.
 
bool keep_positions = false
 Set to true to keep original positions (default: false)
 
bool allow_overlap = false
 Set to true to skip container overlap check.
 
int max_trials = 20'000
 Maximum number of container overlap checks.
 

Detailed Description

Inserts molecules into random positions in the container.

Member Function Documentation

◆ operator()()

ParticleVector Faunus::RandomInserter::operator() ( const Geometry::GeometryBase geo,
MoleculeData molecule,
const ParticleVector ignored_other_particles = ParticleVector() 
)
overridevirtual
Parameters
geoGeometry to use for PBC and container overlap check
moleculeMolecular type to insert
ignored_other_particlesOther particles in the system (ignored for this inserter!)
Returns
Inserted particle vector

Implements Faunus::MoleculeInserter.


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