C++ Interface
An example usage of the C++ interface is shown in $HOME/feasst/tutorial/tutorial.cpp and compiled in BASH as follows:
# Compile FEASST normally, ending with the command: make install.
# Set CMAKE_PREFIX_PATH in $HOME/feasst/tutorial/CMakeLists.txt
mkdir build; cd &_
cmake ..
make
./tutorial
C++ classes are organized as follows.
The random number generate is set by Random
.
Configuration
contains the identity and positions of particles, sites and the spatial Domain
.
Model
computes the potential energy between two sites.
To find all available Models
, look at the subclasses in the documentation for one
or two
body Models.
VisitModel
loops a Model
over all selected particles and sites, or contains a many-body potential such as LongRangeCorrections
or Ewald
.
Potential
contains both Model
and VisitModel
.
Trial
is a MonteCarlo
trial move.
Criteria
determine if the Trial
is accepted or rejected.
FlatHistogram
methods Bias
along a Macrostate
.
Analyze
and Modify
occur every fixed number of Trials
, but an Action
happens only once.
These base classes have all their subclasses listed in their respective documentation.
The C++ interface is organized by plugins. A FEASST plugin is a collection of related classes. Unnecessary plugins can be removed from the FEASST_PLUGINS variable in /path/to/feasst/CMakeLists.txt. Similarly, plugins can also be added this way. In both cases, FEASST must be reinstalled.
The recommended approach for finding more information on a class is demonstrated as follows. If you would like more information on RandomMT19937 but are not sure where to find it, you could search headers files
grep -r --include=*.h RandomMT19937
And find that the class is part of the Math plugin.
See the example plugin as a template for creating your own class or plugin.
The plugins and classes listed below represent all the publicly available capabilities of FEASST.
- Threads
- Utilities
- ArgumentParse
- utils/include/arguments
- utils/include/arguments_extra
- Cache
- CustomException
- utils/include/debug
- utils/include/file
- utils/include/max_precision
- utils/include/io
feasst
feasst::install_dir()
feasst::version()
feasst::feasst_str()
feasst::feasst_str()
feasst::feasst_str()
feasst::str()
feasst::split()
feasst::trim()
feasst::trim()
feasst::str()
feasst::num_spaces()
feasst::is_found_in()
feasst::replace()
feasst::str_to_int()
feasst::str_to_double()
feasst::str_to_bool()
feasst::sized_int_to_str()
- ProgressReport
- Timer
- utils/include/utils
feasst
feasst::find_in_list()
feasst::find_in_list()
feasst::find_in_list()
feasst::resize()
feasst::resize()
feasst::resize()
feasst::resize()
feasst::resize()
feasst::fill()
feasst::fill()
feasst::num_elements()
feasst::num_elements()
feasst::has_duplicate()
feasst::is_equal()
feasst::is_equal()
feasst::is_equal()
feasst::is_equal()
feasst::is_equal()
- Checkpoint
- utils/include/serialize
feasst
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize_version()
feasst::feasst_deserialize_version()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_deserialize()
feasst::feasst_deserialize()
feasst::feasst_serialize_fstobj()
feasst::feasst_deserialize_fstobj()
feasst::feasst_serialize_fstobj()
feasst::feasst_deserialize_fstobj()
feasst::feasst_serialize_fstobj()
feasst::feasst_deserialize_fstobj()
feasst::feasst_serialize_sp()
feasst::feasst_serialize_sp()
feasst::feasst_serialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize()
feasst::feasst_deserialize()
feasst::feasst_serialize_fstdr()
feasst::feasst_serialize()
feasst::feasst_serialize_fstdr()
feasst::feasst_serialize_endcap()
feasst::feasst_deserialize_endcap()
- utils/include/serialize_extra
- TimerRDTSC
- FEASST plugin dependencies
- Math
- math/include/constants
- Euler
- Formula
- FormulaExponential
- FormulaPolynomial
- Histogram
- Matrix
- Minimize
- GoldenSearch
- Position
Position
Position()
Position()
coord()
set_vector()
set_from_cartesian()
push_back()
set_from_spherical()
set_from_spherical()
set_from_spherical()
spherical()
spherical()
coord()
set_coord()
add_to_coord()
size()
dimension()
set_to_origin_3D()
set_to_origin()
set_to_origin()
add()
subtract()
divide()
divide()
multiply()
dot_product()
dot_product()
cross_product()
squared_distance()
distance()
squared_distance()
distance()
str()
cosine()
vertex_angle_radians()
torsion_angle_radians()
normalize()
is_equal()
is_equal()
nearest_distance_to_axis()
orthogonal()
reflect()
- math/include/quadratic_equation
- Random
Random
seed_by_time()
seed()
uniform()
uniform()
coin_flip()
uniform_real()
index()
element()
const_element()
alpha_numeric()
position_in_cube()
position_in_cube()
position_in_cuboid()
position_in_cuboid()
unit_sphere_surface()
position_in_spherical_shell()
index_from_cumulative_probability()
quaternion()
rotation()
rotation()
standard_normal()
normal()
cache()
set_cache_to_load()
set_cache_to_unload()
class_name()
- RandomModulo
- RandomMT19937
- Solver
- SolverBisection
- SolverBrentDekker
- SolverNewtonRaphson
- Table
- math/include/utils_math
feasst
feasst::round()
feasst::average()
feasst::product()
feasst::minimum()
feasst::minimum()
feasst::minimum()
feasst::minimum()
feasst::minimum()
feasst::minimum()
feasst::maximum()
feasst::maximum()
feasst::maximum()
feasst::maximum()
feasst::maximum()
feasst::maximum()
feasst::sum()
feasst::sum()
feasst::sum()
feasst::local_minimum_indices()
feasst::feasst_union()
feasst::feasst_difference()
feasst::sgn()
feasst::radians_to_degrees()
feasst::degrees_to_radians()
feasst::feasst_swap()
feasst::feasst_sort()
feasst::is_in_interval()
feasst::cumulative_probability()
feasst::spherical_shell_volume()
feasst::add()
feasst::add()
feasst::add()
feasst::add()
feasst::factorial()
feasst::has_bad_value()
feasst::has_bad_value()
- Accumulator
Accumulator
max_block_operations()
num_moments()
accumulate()
average()
stdev()
std()
stdev_of_av()
block_stdev()
block_std_of_std()
block_averages()
block_size()
blocks()
largest_blocks()
largest_block_operation()
block_stdev()
num_values()
sum()
sum_dble()
sum_of_squared()
sum_of_squared_dble()
reset()
max()
min()
moment()
moments()
status_header()
status()
str()
last_value()
is_equivalent()
- FEASST plugin dependencies
- Configuration
- Configuration
Configuration
serialize()
Configuration()
add_particle_type()
num_particle_types()
num_site_types()
num_bond_types()
num_angle_types()
num_dihedral_types()
particle_type()
type_to_file_name()
particle_types()
add()
model_params()
set_model_param()
set_model_param()
set_model_param()
add_model_param()
add_or_set_model_param()
set_physical_constants()
physical_constants()
unique_types()
unique_type()
unique_type()
max_sites_in_any_particle()
set_site_type()
site_type_to_particle_type()
num_site_types_per_particle_type()
add()
num_groups()
particle_type_to_group()
particle_type_to_group_create()
group_index()
group_selects()
group_select()
add_particle_of_type()
particle()
particle()
selection_of_all()
num_particles()
num_sites()
num_particles_of_type()
newest_particle()
num_sites_of_type()
num_sites_of_type()
num_sites_of_type()
num_sites_of_type()
update_positions()
update_positions()
update_positions()
copy_particles()
displace_particles()
displace_particle()
displace()
replace_position()
remove_particles()
remove_particle()
set()
domain()
set_side_lengths()
dimension()
init_wrap()
num_cell_lists()
increment_num_cell_lists()
revive()
particles()
select_particle()
newest_particle_index()
ghosts()
wrap_particle()
add_non_ghost_particle_of_type()
set_selection_physical()
set_property()
add_site_property()
add_or_set_site_property()
add_or_set_particle_type_site_property()
set_site_property()
set_site_property()
set_particle_type()
add()
neighbor_criteria()
neighbor_criteria()
check()
are_all_sites_physical()
is_equal()
check_dimensions()
status_header()
status()
str()
- Domain
Domain
side_lengths()
side_length()
set_side_lengths()
set_side_length()
add_side_length()
set_cubic()
is_cubic()
xy()
xz()
yz()
disable()
periodic()
dimension()
volume()
shift()
shift_opt()
wrap()
random_position()
random_position()
min_side_length()
max_side_length()
inscribed_sphere_diameter()
unwrap()
status_header()
status()
- NeighborCriteria
- PhysicalConstants
- Properties
- Bond
- ModelParam
- Group
- Select
Select
check()
is_equal()
random_particle()
str()
is_empty()
clear()
add_site()
set_site()
set_particle()
add_sites()
remove_sites()
add_particle()
add_particle()
num_particles()
num_sites()
add()
remove()
remove_last_particle()
remove_last_site()
remove_last_sites()
remove_first_site()
remove_first_sites()
remove_particle()
particle_indices()
site_indices()
site_indices()
replace_indices()
is_overlap()
is_group_empty()
set_group()
group()
Select()
Select()
has_positions()
site_positions()
site_properties()
set_site_position()
set_site_position()
add_to_site_position()
set_site_properties()
load_position()
load_positions()
load_positions_of_last()
geometric_center()
trial_state()
set_trial_state()
exclude()
excluded()
set_new_bond()
new_bond()
set_old_bond()
old_bond()
reset_excluded_and_bond()
- Site
- Particle
Particle
max_distance()
add()
site()
set_site()
sites()
num_sites()
remove_site()
is_isotropic()
set_site_physical()
check()
increment_site_types()
remove_non_unique_types()
set_site_type()
num_sites_of_type()
displace()
replace_position()
replace_position()
replace_properties()
add_site_property()
add_or_set_site_property()
set_site_property()
num_bonds()
bond()
bonds()
add_bond()
add_bond_property()
add_bond_model()
erase_bonds()
bond()
bond_neighbors()
num_angles()
angle()
angles()
add_angle()
add_angle_property()
add_angle_model()
angle()
angle_neighbors()
num_dihedrals()
dihedral()
dihedrals()
add_dihedral()
add_dihedral_property()
add_dihedral_model()
dihedral()
dihedral_neighbors()
type()
set_type()
- FileParticle
- ParticleFactory
ParticleFactory
unique_particles()
unique_types()
check_types()
check_types()
check_site_types()
check_particle_types()
check_bond_types()
check_angle_types()
check_dihedral_types()
add()
add()
remove()
particle()
particles()
num()
replace_position()
replace_position()
replace_properties()
scale_particle_positions()
check()
num_site_types()
num_sites()
num_particle_types()
num_bond_types()
num_bonds()
num_angle_types()
num_angles()
num_dihedral_types()
num_dihedrals()
set_site_type()
remove()
displace()
model_params()
add()
set_model_param()
set_model_param()
set_model_param()
add_model_param()
add_or_set_model_param()
set_cutoff_min_to_sigma()
set_physical_constants()
set_site_physical()
add_property()
add_property()
set_property()
add_site_property()
add_or_set_site_property()
set_site_property()
set_site_property()
- VisitParticles
- VisitConfiguration
- PrinterXYZ
- FileVMD
- FEASST plugin dependencies
- Configuration
- System
- FEASST plugin dependencies
- API
- BondFourBody
- BondThreeBody
- AngleSquareWell
- BondTwoBody
- BondSquareWell
- BondVisitor
- Cells
- CutoffOuter
- Model
- ModelOneBody
- ModelEmpty
- ModelThreeBody
- ModelTwoBody
- LennardJones
- IdealGas
- HardSphere
- ModelTwoBodyFactory
- ModelTwoBodyTable
- PotentialFactory
- RigidAngle
- RigidBond
- RigidDihedral
- SynchronizeData
- EnergyMap
- ThermoParams
- VisitModel
- LongRangeCorrections
- DontVisitModel
- VisitModelBond
- VisitModelCell
- VisitModelInner
- VisitModelIntra
- VisitModelIntraMap
- System
System
set()
thermo_params()
set_beta()
change_volume()
delta_volume_previous()
total_volume()
revert()
finalize()
load_cache()
unload_cache()
status_header()
status()
check()
serialize()
System()
add()
num_configurations()
configuration()
dimension()
add()
set_unoptimized()
add_to_unoptimized()
unoptimized()
potential()
add_to_optimized()
optimized()
add_to_reference()
num_references()
reference()
references()
potentials()
remove_opt_overlap()
add()
neighbor_criteria()
neighbor_criteria()
precompute()
unoptimized_energy()
energy()
perturbed_energy()
stored_energy()
stored_energy_profile()
reference_energy()
reference_energy()
initialize()
System()
- VisitModelCutoffOuter
- Potential
Potential
group_index()
cell_index()
Potential()
model()
Potential()
visit_model()
Potential()
set()
set_model_params()
set_model_param()
set_model_param()
model_params()
model_params()
does_cutoff_fit_domain()
precompute()
energy()
select_energy()
stored_energy()
set_stored_energy()
change_volume()
revert()
finalize()
cache()
load_cache()
unload_cache()
serialize()
Potential()
- Monte Carlo
- Tutorial
- FEASST plugin dependencies
- API
- Acceptance
Acceptance
ln_metropolis_prob()
set_ln_metropolis_prob()
add_to_ln_metropolis_prob()
reject()
set_reject()
endpoint()
set_endpoint()
reset()
updated()
energy_new()
set_energy_new()
add_to_energy_new()
num_configurations()
energy_profile_new()
set_energy_profile_new()
add_to_energy_profile_new()
subtract_from_energy_profile_new()
energy_old()
set_energy_old()
add_to_energy_old()
energy_profile_old()
set_energy_profile_old()
add_to_energy_profile_old()
energy_ref()
set_energy_ref()
macrostate_shift()
add_to_macrostate_shift()
add_to_perturbed()
set_perturbed_state()
perturbed()
- Action
- Constraint
- ConstrainVolumeByCutoff
- ConstrainNumParticles
- Perturb
- PerturbMove
- PerturbRemove
- PerturbRotate
- PerturbTranslate
- PerturbAnywhere
- PerturbAdd
- RefPotential
- RemoveAnalyze
- RemoveModify
- RemoveTrial
- TrialCompute
- TrialComputeAdd
- TrialComputeMove
- TrialComputeRemove
- TrialComputeTranslate
- TrialComputeVolume
- TrialSelect
TrialSelect
group_index()
particle_type()
configuration_index()
configuration()
get_configuration()
set_configuration_index()
before_select()
select()
sel()
precompute()
mobile()
set_mobile()
mobile_original()
set_mobile_original()
anchor()
anchor_position()
set_trial_state()
reset_mobile()
probability()
mid_stage()
set_ghost()
is_ghost()
printable()
are_constraints_satisfied()
is_particle_type_set()
remove_unphysical_sites()
replace_mobile()
property()
has_property()
add_or_set_property()
is_isotropic()
- TrialSelectAll
- TrialSelectBond
- TrialSelectAngle
- TrialSelectDihedral
- TrialSelectParticle
- TrialStage
- Tunable
- WriteCheckpoint
- WriteModelParams
- Stepper
Stepper
trials_per_update()
trials_per_write()
output_file()
output_file()
output_file_append_phase()
empty_output_file()
append()
rewrite_header()
stop_after_phase()
start_after_phase()
stop_after_iteration()
start_after_iteration()
configuration_index()
configuration()
set_state()
is_multistate()
state()
accumulator()
get_accumulator()
trials_since_update()
trials_since_write()
is_multistate_aggregate()
header()
printer()
Stepper()
- Analyze
- PerturbVolume
- AnalyzeFactory
- Modify
- ModifyFactory
- MonteCarlo
MonteCarlo
MonteCarlo()
MonteCarlo()
begin()
parse_args()
add_args()
resume()
clear_arguments()
set()
random()
seed_random()
add()
configuration()
add()
add()
set()
add_to_optimized()
add_to_reference()
add()
set()
thermo_params()
set()
system()
initialize_system()
trial_factory()
analyze_factory()
modify_factory()
set()
criteria()
initialize_criteria()
add()
add()
remove_trial()
trials()
trial()
initialize_trials()
add()
remove_analyze()
analyzers()
analyze()
num_analyzers()
initialize_analyzers()
add()
remove_modify()
modifiers()
modify()
num_modifiers()
set()
write_checkpoint()
run()
attempt()
reset_trial_stats()
run_num_trials()
run_until_num_particles()
run_for_hours()
run_until_complete()
run_until_file_exists()
set_num_iterations_to_complete()
attempt_trial()
write_to_file()
next_arg()
set_parse_for_num_configs()
set_parse_replace()
set_timer()
timer()
- Run
- Rosenbluth
- PerturbDistance
- PerturbDistanceAngle
- PerturbDihedral
- Criteria
Criteria
Criteria()
add()
is_allowed()
before_attempt()
is_accepted()
was_accepted()
set_current_energy()
current_energy()
set_current_energy_profile()
current_energy_profile()
update_current_energy()
status_header()
status()
write()
phase()
increment_phase()
num_iterations_to_complete()
set_num_iterations_to_complete()
num_iterations()
is_complete()
set_complete()
state()
num_states()
set_expanded_state()
expanded_state()
num_expanded_states()
update()
is_equal()
is_equal()
initialize()
- AlwaysReject
- Metropolis
- Trial
Trial
weight()
weight_per_number_fraction()
number_fraction_exclude_type()
add_stage()
add_stage()
add_stage()
set()
num_stages()
stage()
num_success()
num_attempts()
num_auto_reject()
increment_num_attempts()
acceptance()
reset_stats()
status_header()
name_or_description()
status()
tune()
precompute()
set()
compute()
revert()
attempt()
description()
set_description()
Trial()
- TrialFactory
- TrialTransfer
- TrialRemove
- TrialMove
- TrialTranslate
- TrialRotate
- TrialAdd
- TrialVolume
- Acceptance
- Models
- Steppers
- AnalyzeData
- SeekModify
- WriteStepper
- Check
- CheckEnergy
- CheckPhysicality
- CheckProperties
- Chirality2D
- CriteriaUpdater
- CriteriaWriter
- Density
- DensityProfile
- Energy
- ExtensiveMoments
- GhostTrialVolume
- HeatCapacity
- IncrementPhase
- Movie
- ProfileTrials
- Scattering
- Tune
- Volume
- WrapParticles
- NumParticles
- ProfileCPU
- WallClockLimit
- CPUTime
- MeanSquaredDisplacement
- ReadConfigFromFile
- Log
- PairDistributionInner
- Tutorial
- FEASST plugin dependencies
- Flat histogram
- Tutorial
- Ideal gas equation of state using grand canonical ensemble transition-matrix Monte Carlo
- Grand canonical ensemble transition-matrix Monte Carlo
- Analysis of a one-phase (supercritical) simulation
- Analysis of a two-phase (phase separated) simulation
- Grand Canonical Flat Histogram Simulation of Lennard-Jones
- Grand Canonical Flat Histogram Simulation of SPC/E
- Grand Canonical Flat Histogram Simulation of RPM
- Grand Canonical Flat Histogram Simulation of Hard Spheres.
- Grand Canonical Flat Histogram Simulation of Patchy Trimers
- Grand Canonical Flat Histogram Simulation of Kern-Frenkel Patches
- Grand Canonical Flat Histogram Simulation at low temperature
- Grand Canonical Flat Histogram Simulation of EMP2 CO2
- Grand Canonical Flat Histogram Simulation of TraPPE alkanes
- Efficiency of 1 or 2 bin Grand Canonical Flat Histogram Simulations
- FEASST plugin dependencies
- API
- Tutorial
- Patch
- Mayer
- MayerSampling
- Tutorial
- Second virial coefficient calculation of a Trimer using Mayer-Sampling
- Second virial coefficient calculation of TraPPE ethane using Mayer-Sampling
- Second virial coefficient calculation of a Kern-Frenkel patch using Mayer-Sampling
- Virial coefficients of all-atom mAb domains.
- Virial coefficients of 7-bead coarse-grained mAb model.
- Virial coefficients of spherocylinders.
- Virial coefficients of solids of revolusion.
- Virial coefficients of atomistic proteins in implicit solvent
- FEASST plugin dependencies
- XTC
- Chain
- PerturbConnector
- PerturbCrankshaft
- PerturbCrankshaftSmall
- PerturbLibrary
- PerturbParticlePivot
- PerturbPivot
- PerturbPositionSwap
- PerturbSiteType
- PerturbToAnchor
- SelectBranch
- SelectCrankshaftSmall
- SelectParticlePivot
- SelectPerturbed
- SelectSegment
- SelectEndSegment
- SelectSiteOfType
- SelectTwoSites
- EndToEndDistance
- RadiusOfGyration
- SelectReptate
- PerturbReptate
- PerturbDistanceAngleConnector
- PerturbBranch
- AnalyzeBonds
- GhostTrialGrow
- TrialSwapSites
- TrialGrowLinear
- TrialGrow
- TrialReptate
- TrialPivot
- TrialParticlePivot
- TrialCrankshaftSmall
- TrialCrankshaft
- Tutorial
- FEASST plugin dependencies
- Shape
- Confinement
- Slab, cylindrical, spherical and mixed confinement
- Grand Canonical Flat Histogram Simulation of Lennard-Jones in a simple WCA porous network
- Grand Canonical Flat Histogram Simulation of TraPPE CO2 in ZIF8
- FEASST plugin dependencies
- API
- Charge
- Optimized Lennard-Jones
- Cluster
- Monte Carlo with rigid cluster moves
- FEASST plugin dependencies
- API
- ComputeMoveCluster
- PerturbMoveAVB
- PerturbAddAVB
- PerturbPointReflect
- PerturbRotateCOM
- SelectCluster
- AnalyzeCluster
- CalculateCluster
- SelectParticleAVBDivalent
- SelectParticleAVB
- EnergyMapNeighbor
- EnergyMapNeighborCriteria
- EnergyMapAll
- EnergyMapAllCriteria
- TrialAVB4
- TrialTranslateCluster
- TrialTransferAVBDivalent
- TrialTransferAVB
- TrialRotateCluster
- TrialRigidCluster
- TrialRemoveAVBDivalent
- TrialRemoveAVB
- TrialAVB2
- TrialAddAVBDivalent
- TrialAddAVB
- ComputeRemoveAVBDivalent
- ComputeRemoveAVB
- ComputeGCA
- ComputeAVB4
- ComputeAVB2
- ComputeAddAVBDivalent
- ComputeAddAVB
- Expanded Grand Canonical Ensemble
- Morph
- Beta expanded
- Prefetch
- Aniso
- Modify FEASST
- Gibbs
- Server
- Model Expanded
- FFTW
- NetCDF
- MPI