faunus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Faunus::move::ChainRotationMoveBase Class Referenceabstract

An abstract base class for rotational movements of a polymer chain. More...

#include <chainmove.h>

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

Public Member Functions

double bias (Change &, double uold, double unew) override
 Extra energy not captured by the Hamiltonian. More...
 
- 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)
 
 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

 ChainRotationMoveBase (Space &spc, const std::string &name, const std::string &cite)
 
void _from_json (const json &j) override
 Extra info for report if needed.
 
void _to_json (json &j) const override
 Extra info for report if needed.
 

Protected Attributes

std::string molname
 
size_t molid
 
double dprot
 maximal angle of rotation, ±0.5*dprot
 
double sqdispl
 center-of-mass displacement squared
 
Average< double > msqdispl
 center-of-mass mean squared displacement
 
bool permit_move = true
 
bool allow_small_box = false
 
int small_box_encountered = 0
 number of skipped moves due to too small container
 
- 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

An abstract base class for rotational movements of a polymer chain.

Member Function Documentation

◆ bias()

double Faunus::move::ChainRotationMoveBase::bias ( Change change,
double  old_energy,
double  new_energy 
)
overridevirtual

Extra energy not captured by the Hamiltonian.

This can be used to introduce an extra energy change that will be added to the total trial energy in the Metropolis acceptance criterion.

Typically used to include bias not contained in Energy::Hamiltonian.

Parameters
changeChange made to the system
old_energyEnergy from hamiltonian before the change (kT)
new_energyEnergy from hamiltonian after the change (kT)
Returns
Energy due to custom bias from the particular move (kT)

Reimplemented from Faunus::move::Move.


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