faunus
Public Member Functions | List of all members
Faunus::Energy::Bonded Class Reference

The keys of the intra map are group index and the values is a vector of BondData. More...

#include <energy.h>

Inheritance diagram for Faunus::Energy::Bonded:
Inheritance graph
[legend]
Collaboration diagram for Faunus::Energy::Bonded:
Collaboration graph
[legend]

Public Member Functions

 Bonded (const Space &spc, BondVector external_bonds)
 
 Bonded (const json &j, const Space &spc)
 
void to_json (json &j) const override
 json output
 
double energy (const Change &change) override
 brute force – refine this!
 
void force (std::vector< Point > &forces) override
 Calculates the forces on all particles. More...
 
- Public Member Functions inherited from Faunus::Energy::EnergyTerm
virtual void sync (EnergyTerm *other_energy, const Change &change)
 Sync (copy from) another energy instance. More...
 
virtual void init ()
 reset and initialize
 
virtual void updateState (const Change &change)
 Update internal state to reflect change in e.g. Space. More...
 
virtual void force (PointVector &forces)
 update forces on all particles
 

Additional Inherited Members

- Public Types inherited from Faunus::Energy::EnergyTerm
enum  MonteCarloState { ACCEPTED, TRIAL, NONE }
 
- Public Attributes inherited from Faunus::Energy::EnergyTerm
MonteCarloState state = MonteCarloState::NONE
 
std::string name
 Meaningful name.
 
std::string citation_information
 Possible reference; may be left empty.
 
TimeRelativeOfTotal< std::chrono::microseconds > timer
 Timer for measuring speed.
 

Detailed Description

The keys of the intra map are group index and the values is a vector of BondData.

For bonds between groups, fill in inter which is evaluated for every update of call to energy.

Todo:
Optimize.

Member Function Documentation

◆ force()

void Faunus::Energy::Bonded::force ( std::vector< Point > &  forces)
override

Calculates the forces on all particles.

Parameters
forcesTarget force vector for all particles in the system

Each element in force represents the force on a particle and this updates (add) the bonded force.

  • loop over groups and their internal bonds and add force
  • loop over inter-molecular bonds and add force

Force unit: kT/Å

Warning
Untested

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