ModelTableCart1D

class ModelTableCart1D : public feasst::ModelOneBody

A tabular potential for interactions in one Cartesian dimension. The table file is formatted as follows:

The first line should be “site_types=” followed by a comma-separated list of the labels of each site type. The remaining lines are the individual tables for each of the site types. For example, “site_types=O,H” will then contain a line for the table of “O” sites, then another line for the table of “H” sites. Each table is given in a single line by a number of space-separated values that represent the interaction energy spanning the range of a coordinate, z, scaled by the periodic boundary lengths, L, with the range z=[-0.5, 0.5] and linear spacing. For example, if the line contains 5 values, then z=[-0.5, -0.25, 0, 0.25, 0.5] and the potential will be interpolated with Table1D::forward_difference_interpolation.

Public Functions

void precompute(const Configuration &config)

Precompute model parameters based on existing model parameters.

double energy(const Position &wrapped_site, const Site &site, const Configuration &config, const ModelParams &model_params)

Return the energy given the wrapped coordinates, site, config and params.

void serialize(std::ostream &ostr) const

Output a serialized version of the existing model.

Arguments

  • table_file: file name for the table.

  • dimension: the cartesian dimension to apply the Potential (default: 2).

class ModelTableCart1DHard : public feasst::ModelOneBody

A tabular potential for a hard surface based on x,y cartesian coordinates. Assumes symmetry along the x plane and that the Domain has no tilt.

Public Functions

void compute_table(Shape *shape, Domain *domain, Random *random, argtype args = argtype(), const int site_type = 0)

Generate the table by finding where the point is inside the shape and the nearest distance to the surface is half of the diameter. The initial bounds are [0, L/2] inclusive, assuming a plane (or line) of symmetry at origin perpendicular to y axis.

args:

  • diameter: diameter of the sphere (default: 1)

double energy(const Position &wrapped_site, const Site &site, const Configuration &config, const ModelParams &model_params)

Return the energy given the wrapped coordinates, site, config and params.

void serialize(std::ostream &ostr) const

Output a serialized version of the existing model.

class ModelTableCart2DIntegr : public feasst::ModelOneBody

A tabular potential based on cartesian coordinates. Assumes symmetry along the x, y planes and that the Domain has no tilt. Integration of material does not take periodicity into account. E.g., the shapes extend forever and are not periodic in the domain.

Public Functions

void compute_table(Shape *shape, Domain *domain, Random *random, argtype integration_args, const int site_type = 0)

Generate the table by integration of the shape of the confinement over the entire and domain.

param integration_args:

See Shape for documentation of integration_args.

void compute_table_omp(Shape *shape, Domain *domain, Random *random, argtype integration_args, const int site_type = 0, const int node = 0, const int num_node = 1)

Same as above, but parallelize the task with OMP.

param node:

See Thread for documentation of these two arguments.

double energy(const Position &wrapped_site, const Site &site, const Configuration &config, const ModelParams &model_params)

Return the energy given the wrapped coordinates, site, config and params.

void serialize(std::ostream &ostr) const

Output a serialized version of the existing model.

class ModelTableCart3DIntegr : public feasst::ModelOneBody

A tabular potential based on cartesian coordinates. Assumes symmetry along the x, y and z planes and that the Domain has no tilt. Integration of material does not take periodicity into account. E.g., the shapes extend forever and are not periodic in the domain.

Public Functions

const Table3D &table(const int site_type = 0) const

Return the table for a given site type.

void compute_table(Shape *shape, const Domain &domain, Random *random, argtype integration_args, const int site_type = 0)

Generate the table by integration of a shape, which represents a continuous medium, over the entire domain.

param integration_args:

See Shape for documentation of integration_args.

void compute_table_omp(Shape *shape, const Domain &domain, Random *random, argtype integration_args, const int site_type = 0, const int node = 0, const int num_nodes = 1)

Same as above, but parallelize the task with OMP.

param node:

See Thread for documentation of these two arguments.

void compute_table(Shape *shape, const Domain &domain, Random *random, argtype *integration_args, const int site_type = 0)
param integration_args:

See Shape for documentation of integration_args.

void compute_table_omp(Shape *shape, const Domain &domain, Random *random, argtype *integration_args, const int site_type = 0, const int node = 0, const int num_nodes = 1)

Same as above, but parallelize the task with OMP.

param node:

See Thread for documentation of these two arguments.

void compute_table(System *system, Select *select, const int site_type = 0)

Generate the table by computing the energy of interaction of the select with the rest of the system. The select is assumed to be a single site, so that tables can be generated for each site type.

void compute_table_omp(System *system, Select *select, const int site_type = 0, const int node = 0, const int num_node = 1)

Same as above, but parallelize the task with OMP.

param node:

See Thread for documentation of these two arguments.

double energy(const Position &wrapped_site, const Site &site, const Configuration &config, const ModelParams &model_params)

Return the energy given the wrapped coordinates, site, config and params.

void serialize(std::ostream &ostr) const

Output a serialized version of the existing model.

Arguments

  • scale: scale all interactions by this amount (default: 1).

  • table_file: file name for the table. If table_file and scale are the only arguments given, then simply read the table. Otherwise, use the following arguments to build and output the table to file.

  • shape_file: ShapeFile that describes the shape.

  • ModelTableCart3DIntegr::compute_table::integration_args.

  • use_omp: use OpenMP to compute the table (default: false).

  • node: for parallelization, see compute_table_omp (default: 0).

  • num_node: for parallelization, see compute_table_omp (default: 1).

  • Table3D arguments.

  • Domain arguments.

The format for the table file is as follows.

The first line should be ‘site_types’ followed by the number of site types and then the identity of each of those site types in order of the tables given below. (e.g., “site_types n i” where n is the number of site types and each following number is the type of each site.)

The remaining lines are the individual tables for each of the site types.