SimulationParams Class Reference

#include <SimulationParams.h>

Public Member Functions

 SimulationParams ()
 
 ~SimulationParams ()
 
int validate (int sim_mode)
 
int parse_param_assignment (char *str)
 DEPRECATED! Superseeded by: extract_params + assign. More...
 
int extract_params (vector< string > script_vector)
 
int assign (string lvalue, string rvalue)
 
int get_max_num_states ()
 
void write_to_file (FILE *fout, PreComp_params &pc_params)
 

Data Fields

scalar dt
 time step More...
 
long long num_steps
 Number of time steps to run simulation for. More...
 
int check
 Every how many steps should the program 'check' the system i.e calculate energies, print snapshots etc. More...
 
int num_blobs
 Number of blobs in the system. More...
 
int num_rods
 Number of rods in the system. More...
 
int num_interfaces
 Number of rod-blob or rod-rod interfaces. More...
 
int * num_conformations
 Number of conformations for each blob. More...
 
int * num_states
 Number of states for each blob. More...
 
int state_array_size
 
int conformation_array_size
 
int rng_seed
 Seed for random number generator. More...
 
scalar kT
 boltzmann's const times temperature More...
 
int max_iterations_cg
 Max number of iterations when using conjugate gradient solver. More...
 
scalar epsilon2
 The tolerance threshold for CG solver (squared) More...
 
int es_update
 Every how many steps should the electrostatic potential be recalculated. More...
 
int es_N_x
 X dimension of the 3D lookup grid (in number of cells) More...
 
int es_N_y
 Y dimension of the 3D lookup grid (in number of cells) More...
 
int es_N_z
 Z dimension of the 3D lookup grid (in number of cells) More...
 
int move_into_box
 If box is set, do we move the world to it's center at the start of a simulation? Default is yes! More...
 
int restrict_motion [3]
 [x,y,z] array defining whether motion in the given direction should be nullified More...
 
int num_dimensions
 
scalar es_h
 Number of active dimensions after restricted_motion is applied. More...
 
scalar kappa
 Inverse Debye Screening length. More...
 
scalar epsilon_0
 Permittivity of free space. More...
 
scalar dielec_ext
 Exterior dielectric constant. More...
 
int restart
 Whether or not to restart the simulation from the last available time step. More...
 
int calc_ssint
 Whether or not to simulate surface-surface interactions between surfaces. More...
 
int inc_self_ssint
 Whether or not to include surface-surface interactions derived from faces in the same blob. More...
 
string ssint_type
 Current possible values: "lennard-jones" (default) or "steric". More...
 
int calc_es
 Whether or not to simulate electrostatic interactions between proteins. More...
 
int calc_noise
 Whether or noise to simulate thermal noise for the system. Kind of the entire point of this simulation technique. More...
 
int calc_stokes
 Whether or not to include local action of the external fluid. More...
 
int calc_kinetics
 Whether or not to calculate kinetic switching between different equilibrium states and binding sites. More...
 
int calc_preComp
 Whether or not use preComputed potentials and forces. More...
 
int calc_springs
 Whether or not to include the springs interactions defined in the springs block. More...
 
int calc_ctforces
 Whether or not to include constant forces onto nodes defined in the ctforces block. More...
 
int force_pbc
 Whether or not to apply pbc to surface insteractions. More...
 
int kinetics_update
 How often to check for a state change. If rates are ~ >> dt then this can clearly be quite high. More...
 
int wall_x_1
 
int wall_x_2
 
int wall_y_1
 
int wall_y_2
 
int wall_z_1
 
int wall_z_2
 
int sticky_wall_xz
 
scalar stokes_visc
 
int calc_steric
 Calculate steric interactions? More...
 
scalar steric_factor
 Proportionality factor to the Steric repulsion. More...
 
scalar ssint_cutoff
 Cutoff distance for the surface-surface interactions. More...
 
geoscalar steric_dr
 used to calculate the numerical derivative. More...
 
string FFEA_script_filename
 
b_fs::path FFEA_script_path
 
b_fs::path FFEA_script_basename
 
string trajectory_out_fname
 
string kinetics_out_fname
 
string measurement_out_fname
 
string detailed_meas_out_fname
 
string ssint_in_fname
 
string bsite_in_fname
 
string icheckpoint_fname
 Input Checkpoint file name. More...
 
string ocheckpoint_fname
 Output Checkpoint file name. More...
 
string ctforces_fname
 Input file containing constant forces onto a list of nodes. More...
 
string springs_fname
 Input file containing the springs details. More...
 
string trajectory_beads_fname
 Output optional file. More...
 
int kinetics_out_fname_set
 
int trajbeads_fname_set
 

Private Member Functions

int checkFileName (string oFile)
 
string RemoveFileExtension (const string &FileName)
 

Private Attributes

int trajectory_out_fname_set
 
int measurement_out_fname_set
 
int icheckpoint_fname_set
 
int ocheckpoint_fname_set
 
int ssint_in_fname_set
 
int bsite_in_fname_set
 

Constructor & Destructor Documentation

◆ SimulationParams()

SimulationParams::SimulationParams ( )

◆ ~SimulationParams()

SimulationParams::~SimulationParams ( )

Member Function Documentation

◆ assign()

int SimulationParams::assign ( string  lvalue,
string  rvalue 
)

Expects a parameter label and value, which will be assigned if valid and rejected if not

Referenced by extract_params().

◆ checkFileName()

int SimulationParams::checkFileName ( string  oFile)
private

Check if the file oFile exists, and if so rename it to "__"+oFile+"__bckp.N", where N is an integer so that the resulting file is new.

Referenced by validate().

◆ extract_params()

int SimulationParams::extract_params ( vector< string >  script_vector)

Expects a string of the form "<system>\n<>\n<>.....\n<system>" where parameter data can be extracted from.

Referenced by World::init().

◆ get_max_num_states()

int SimulationParams::get_max_num_states ( )

Returns maximum number of states on any blob

◆ parse_param_assignment()

int SimulationParams::parse_param_assignment ( char *  str)

DEPRECATED! Superseeded by: extract_params + assign.

Expects a string of the form "lvalue = rvalue" where lvalue must be a recognised parameter name.

◆ RemoveFileExtension()

string SimulationParams::RemoveFileExtension ( const string &  FileName)
private

Referenced by assign().

◆ validate()

int SimulationParams::validate ( int  sim_mode)

Referenced by World::init().

◆ write_to_file()

void SimulationParams::write_to_file ( FILE *  fout,
PreComp_params pc_params 
)

Writes all params to fout (either a file or stdout) for user's info

Referenced by World::init(), and World::read_and_build_system().

Field Documentation

◆ bsite_in_fname

string SimulationParams::bsite_in_fname

◆ bsite_in_fname_set

int SimulationParams::bsite_in_fname_set
private

◆ calc_ctforces

int SimulationParams::calc_ctforces

Whether or not to include constant forces onto nodes defined in the ctforces block.

Referenced by assign(), Blob::init(), World::read_and_build_system(), SimulationParams(), Blob::update_internal_forces(), validate(), write_to_file(), and ~SimulationParams().

◆ calc_es

int SimulationParams::calc_es

◆ calc_kinetics

◆ calc_noise

int SimulationParams::calc_noise

Whether or noise to simulate thermal noise for the system. Kind of the entire point of this simulation technique.

Referenced by Blob::aggregate_forces_and_solve(), assign(), Blob::init(), Blob::reset_solver(), SimulationParams(), Blob::update_internal_forces(), validate(), write_to_file(), and ~SimulationParams().

◆ calc_preComp

◆ calc_springs

int SimulationParams::calc_springs

◆ calc_ssint

int SimulationParams::calc_ssint

◆ calc_steric

◆ calc_stokes

int SimulationParams::calc_stokes

◆ check

int SimulationParams::check

Every how many steps should the program 'check' the system i.e calculate energies, print snapshots etc.

Referenced by assign(), ffea_test::lower_sphere(), World::print_trajectory_and_measurement_files(), World::run(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ conformation_array_size

int SimulationParams::conformation_array_size

◆ ctforces_fname

string SimulationParams::ctforces_fname

Input file containing constant forces onto a list of nodes.

Referenced by Blob::init(), World::read_and_build_system(), SimulationParams(), write_to_file(), and ~SimulationParams().

◆ detailed_meas_out_fname

string SimulationParams::detailed_meas_out_fname

◆ dielec_ext

scalar SimulationParams::dielec_ext

Exterior dielectric constant.

Referenced by assign(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ dt

◆ epsilon2

scalar SimulationParams::epsilon2

◆ epsilon_0

scalar SimulationParams::epsilon_0

Permittivity of free space.

Referenced by assign(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ es_h

scalar SimulationParams::es_h

Number of active dimensions after restricted_motion is applied.

Dimension of each cell in the lookup grid (in multiples of inverse kappa)

Referenced by assign(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ es_N_x

int SimulationParams::es_N_x

X dimension of the 3D lookup grid (in number of cells)

Referenced by assign(), PreComp_solver::init(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ es_N_y

int SimulationParams::es_N_y

Y dimension of the 3D lookup grid (in number of cells)

Referenced by assign(), PreComp_solver::init(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ es_N_z

int SimulationParams::es_N_z

Z dimension of the 3D lookup grid (in number of cells)

Referenced by assign(), PreComp_solver::init(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ es_update

int SimulationParams::es_update

Every how many steps should the electrostatic potential be recalculated.

Referenced by assign(), World::run(), SimulationParams(), write_to_file(), and ~SimulationParams().

◆ FFEA_script_basename

b_fs::path SimulationParams::FFEA_script_basename

Referenced by assign(), and validate().

◆ FFEA_script_filename

string SimulationParams::FFEA_script_filename

Referenced by assign(), World::init(), and validate().

◆ FFEA_script_path

b_fs::path SimulationParams::FFEA_script_path

◆ force_pbc

int SimulationParams::force_pbc

Whether or not to apply pbc to surface insteractions.

Referenced by assign(), World::read_and_build_system(), World::run(), SimulationParams(), and write_to_file().

◆ icheckpoint_fname

string SimulationParams::icheckpoint_fname

Input Checkpoint file name.

Referenced by assign(), World::init(), SimulationParams(), validate(), and ~SimulationParams().

◆ icheckpoint_fname_set

int SimulationParams::icheckpoint_fname_set
private

◆ inc_self_ssint

int SimulationParams::inc_self_ssint

Whether or not to include surface-surface interactions derived from faces in the same blob.

Referenced by assign(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ kappa

scalar SimulationParams::kappa

Inverse Debye Screening length.

Referenced by assign(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ kinetics_out_fname

string SimulationParams::kinetics_out_fname

◆ kinetics_out_fname_set

int SimulationParams::kinetics_out_fname_set

These set parameters are not private because the World needs them!!

Referenced by assign(), World::init(), SimulationParams(), and ~SimulationParams().

◆ kinetics_update

int SimulationParams::kinetics_update

How often to check for a state change. If rates are ~ >> dt then this can clearly be quite high.

Referenced by assign(), World::load_kinetic_rates(), World::print_trajectory_conformation_changes(), World::run(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ kT

◆ max_iterations_cg

int SimulationParams::max_iterations_cg

Max number of iterations when using conjugate gradient solver.

Referenced by assign(), ConjugateGradientSolver::init(), NoMassCGSolver::init(), World::init(), Blob::init(), SimulationParams(), write_to_file(), and ~SimulationParams().

◆ measurement_out_fname

string SimulationParams::measurement_out_fname

◆ measurement_out_fname_set

int SimulationParams::measurement_out_fname_set
private

◆ move_into_box

int SimulationParams::move_into_box

If box is set, do we move the world to it's center at the start of a simulation? Default is yes!

Referenced by assign(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ num_blobs

◆ num_conformations

◆ num_dimensions

int SimulationParams::num_dimensions

◆ num_interfaces

int SimulationParams::num_interfaces

Number of rod-blob or rod-rod interfaces.

Referenced by assign(), World::init(), World::read_and_build_system(), World::run(), SimulationParams(), and ~SimulationParams().

◆ num_rods

◆ num_states

◆ num_steps

long long SimulationParams::num_steps

Number of time steps to run simulation for.

Referenced by assign(), ffea_test::lower_sphere(), World::run(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ ocheckpoint_fname

string SimulationParams::ocheckpoint_fname

Output Checkpoint file name.

Referenced by assign(), World::init(), SimulationParams(), validate(), and ~SimulationParams().

◆ ocheckpoint_fname_set

int SimulationParams::ocheckpoint_fname_set
private

◆ restart

int SimulationParams::restart

Whether or not to restart the simulation from the last available time step.

Referenced by assign(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ restrict_motion

int SimulationParams::restrict_motion[3]

[x,y,z] array defining whether motion in the given direction should be nullified

◆ rng_seed

int SimulationParams::rng_seed

Seed for random number generator.

Referenced by assign(), World::init(), SimulationParams(), write_to_file(), and ~SimulationParams().

◆ springs_fname

string SimulationParams::springs_fname

Input file containing the springs details.

Referenced by World::read_and_build_system(), SimulationParams(), write_to_file(), and ~SimulationParams().

◆ ssint_cutoff

scalar SimulationParams::ssint_cutoff

Cutoff distance for the surface-surface interactions.

Referenced by assign(), PreComp_solver::init(), World::init(), World::run(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ ssint_in_fname

string SimulationParams::ssint_in_fname

◆ ssint_in_fname_set

int SimulationParams::ssint_in_fname_set
private

◆ ssint_type

string SimulationParams::ssint_type

Current possible values: "lennard-jones" (default) or "steric".

Referenced by assign(), World::init(), Blob::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ state_array_size

int SimulationParams::state_array_size

◆ steric_dr

geoscalar SimulationParams::steric_dr

used to calculate the numerical derivative.

Referenced by assign(), World::init(), SimulationParams(), validate(), and ~SimulationParams().

◆ steric_factor

scalar SimulationParams::steric_factor

Proportionality factor to the Steric repulsion.

Referenced by assign(), World::init(), SimulationParams(), validate(), write_to_file(), and ~SimulationParams().

◆ sticky_wall_xz

int SimulationParams::sticky_wall_xz

◆ stokes_visc

◆ trajbeads_fname_set

◆ trajectory_beads_fname

string SimulationParams::trajectory_beads_fname

Output optional file.

Referenced by assign(), World::init(), SimulationParams(), validate(), and ~SimulationParams().

◆ trajectory_out_fname

◆ trajectory_out_fname_set

int SimulationParams::trajectory_out_fname_set
private

◆ wall_x_1

int SimulationParams::wall_x_1

◆ wall_x_2

int SimulationParams::wall_x_2

◆ wall_y_1

int SimulationParams::wall_y_1

◆ wall_y_2

int SimulationParams::wall_y_2

◆ wall_z_1

int SimulationParams::wall_z_1

◆ wall_z_2

int SimulationParams::wall_z_2

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