faunus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Faunus::move::AtomicTranslateRotate Class Reference

Translate and rotate individual atoms. More...

#include <move.h>

Inheritance diagram for Faunus::move::AtomicTranslateRotate:
Inheritance graph
[legend]
Collaboration diagram for Faunus::move::AtomicTranslateRotate:
Collaboration graph
[legend]

Public Member Functions

 AtomicTranslateRotate (Space &spc, const Energy::Hamiltonian &hamiltonian)
 
- Public Member Functions inherited from Faunus::move::Move
void from_json (const json &j)
 
void to_json (json &j) const
 JSON report w. statistics, output etc.
 
void move (Change &change)
 Perform move and modify given change object.
 
void accept (Change &change)
 
void reject (Change &change)
 
void setRepeat (int repeat)
 
virtual double bias (Change &change, double old_energy, double new_energy)
 Extra energy not captured by the Hamiltonian. More...
 
 Move (Space &spc, std::string_view name, std::string_view cite)
 
bool isStochastic () const
 True if move should be called stochastically.
 
const std::string & getName () const
 

Protected Member Functions

void _to_json (json &) const override
 Extra info for report if needed.
 
void _from_json (const json &) override
 Configure via json object.
 
ParticleVector::iterator randomAtom ()
 Select random particle to move. More...
 
virtual void translateParticle (ParticleVector::iterator, double)
 translate single particle
 
void _move (Change &) override
 Perform move and modify change object.
 
void _accept (Change &) override
 Call after move is accepted.
 
void _reject (Change &) override
 Call after move is rejected.
 
 AtomicTranslateRotate (Space &spc, const Energy::Hamiltonian &hamiltonian, const std::string &name, const std::string &cite)
 

Protected Attributes

int molid = -1
 Molecule id to move.
 
Point directions = {1, 1, 1}
 displacement directions
 
Average< double > mean_square_displacement
 mean squared displacement
 
std::string molecule_name
 name of molecule to operate on
 
Change::GroupChange cdata
 Data for change object.
 
- Protected Attributes inherited from Faunus::move::Move
const std::string name
 Name of move.
 
Spacespc
 Space to operate on.
 
int repeat = 1
 
unsigned long number_of_attempted_moves = 0
 Counter for total number of move attempts.
 

Additional Inherited Members

- Static Public Attributes inherited from Faunus::move::Move
static Random slump
 Shared for all moves.
 

Detailed Description

Translate and rotate individual atoms.

Member Function Documentation

◆ randomAtom()

ParticleVector::iterator Faunus::move::AtomicTranslateRotate::randomAtom ( )
protected

Select random particle to move.

For atomic groups, select ALL since these may be partially filled and thereby appear inactive.

Note also that only one instance of atomic molecules can exist. For molecular groups, select only active ones.

Returns
Iterator to particle to move; end() if nothing selected

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