faunus
Public Types | Public Member Functions | Public Attributes | List of all members
Faunus::Energy::Confine Class Reference

Confines molecules inside geometric shapes Confine particles to a sub-region of the simulation container. More...

#include <externalpotential.h>

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

Public Types

enum  Variant { sphere, cylinder, cuboid, none }
 
- Public Types inherited from Faunus::Energy::EnergyTerm
enum  MonteCarloState { ACCEPTED, TRIAL, NONE }
 

Public Member Functions

 Confine (const json &j, Space &spc)
 
void to_json (json &j) const override
 json output
 
- Public Member Functions inherited from Faunus::Energy::ExternalPotential
 ExternalPotential (const json &j, const Space &spc)
 
double energy (const Change &j) override
 energy due to change
 
- 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
 

Public Attributes

Variant type = 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.
 

Additional Inherited Members

- Protected Attributes inherited from Faunus::Energy::ExternalPotential
const Spacespace
 reference to simulation space
 
std::function< double(const Particle &)> externalPotentialFunc
 energy of single particle
 

Detailed Description

Confines molecules inside geometric shapes Confine particles to a sub-region of the simulation container.

Todo:
enum class; get rid of map; is non-const space needed?

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