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

Performs a pivot move of a random tail part of a polymer chain. More...

#include <chainmove.h>

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

Public Member Functions

 PivotMove (Space &spc)
 
- Public Member Functions inherited from Faunus::move::ChainRotationMoveBase
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

 PivotMove (Space &spc, const std::string &name, const std::string &cite)
 
void _from_json (const json &j) override
 Extra info for report if needed.
 
size_t select_segment () override
 Selects a random harmonic bond of a random polymer chain which atoms then create an axis of rotation. More...
 
- Protected Member Functions inherited from Faunus::move::ChainRotationMove
 ChainRotationMove (Space &spc, const std::string &name, const std::string &cite)
 
- Protected Member Functions inherited from Faunus::move::ChainRotationMoveBase
 ChainRotationMoveBase (Space &spc, const std::string &name, const std::string &cite)
 
void _to_json (json &j) const override
 Extra info for report if needed.
 

Additional Inherited Members

- Static Public Attributes inherited from Faunus::move::Move
static Random slump
 Shared for all moves.
 
- Protected Attributes inherited from Faunus::move::ChainRotationMove
Space::GroupVector::iterator molecule_iter
 
std::array< size_t, 2 > axis_ndx
 Indices of atoms in the spc.p vector that mark the origin and the direction of the axis of rotation. More...
 
std::vector< size_t > segment_ndx
 Indices of atoms in the spc.p vector that shall be rotated.
 
- Protected Attributes inherited from Faunus::move::ChainRotationMoveBase
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.
 

Detailed Description

Performs a pivot move of a random tail part of a polymer chain.

A random harmonic bond is selected from a random polymer chain. The bond determines the axes the rotation. A part of the chain either before or after the bond (the selection has an equal probability ) then constitutes a segment which is rotated by a random angle. The extend of the angle is limited by dprot.

Member Function Documentation

◆ select_segment()

size_t Faunus::move::PivotMove::select_segment ( )
overrideprotectedvirtual

Selects a random harmonic bond of a random polymer chain which atoms then create an axis of rotation.

Atoms between the randomly selected chain's end and the bond atom compose a segment to be rotated. The member vectors containing atoms' indices of the axis and the segment are populated accordingly. Returns the segment size as atom count. A non-branched chain is assumed having atom indices in a dense sequence.

Implements Faunus::move::ChainRotationMoveBase.


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