VisitModelInnerTable

class VisitModelInnerTable : public feasst::VisitModelInner
Represent anisotropic sites using a tabular potential that is precomputed and read from a file.
The relative position and orientation of an arbitrary rigid body is given by 5 orientational degrees of freedom and the radial distance, r between the centers of the two bodies.
The spherical coordinate azimuthal angle [0, 2pi] and polar angle [0, pi] are denoted s1 and s2, and are as described in the Position class. Note that there is increased resolution at the poles. A Fibonacci lattice could more uniformly represent a spherical surface, but interpolation would be more complicated.
The Euler angles, [e1, e2, e3], in order, are as described in the Euler class.
The radial distance, r, is transformed into z which varies from z=0 at the hard contact distance, r_h, to z=1 at the cutoff, r_c. A stretching parameter, \(\gamma\), increases the resolution at shorter distances when negative. \(z=[(r^\gamma  r_h^\gamma)/(r_c^\gamma  r_h^\gamma)]\).
The format of the tabular potential stored in a 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 anisotropic site.)
There is a table for each unique pair of site types. For example, if the first line is as follows: “site_types 2 1 7” then the first table will be for interactions of site type 1 with site type 1 (i.e., 11), the second table will be for 17 interactions, and the third table will be for 77 interactions.
For each pair of site types, i <= j, a table is given by the following lines.
“num_orientations_per_pi [value]” is used to determine the resolution of all 5 orientational degrees of freedom.
”gamma [value]” is the expononent for the definition of z. But, if gamma==0, then use a square well potential.
”delta [value]” is the distance between the hard particle inner cutoff and the outer cutoff when the potential goes to zero (e.g., delta = r_c  r_h).
”num_z [value]” is the number of energy values along the z parameter.
”smoothing_distance [value]” is the distance to linearly interpolate the energy to zero. Specifically, r_c  smoothing_distance is the z=1 value. If smoothing_distance is <= 0, then it is not used at all.
The remaining lines are for each unique set of the five angles. The outer loop is s1, with range [pi, pi]. If i == j, the range is [0, pi] for ij swap symmetry (e.g., swap i and j if s1 < 0). The next loop is s2 in [0, pi], then e1 in [pi, pi], e2 and [0, pi], and finally e3 in [pi, pi]. The number of lines should be (k+1)^3(2k+1)^2, where k=num_orientations_per_pi. Each line then reports the contact distance, r_h, followed by num_z values of the potential energy uniformly in the z range of [0, 1].
Public Functions

VisitModelInnerTable(argtype args = argtype())
args:
table_file: table file with format described above.
ignore_energy: do not read the energy table (default: false).

bool is_energy_table() const
Return true if there is an energy table.

double second_virial_coefficient(argtype args = argtype()) const
Compute the second virial coefficient between anisotropic sites by table integration. See https://doi.org/10.1063/1.5040252 For the hard particle interaction, see Eq D5.
For the Jacobian in integration, see https://doi.org/10.1021%2Facs.jpcb.9b06808 https://doi.org/10.1063/1.432162 (missing alpha integration?) https://doi.org/10.1098/rspa.1948.0009 https://doi.org/10.1063/1.4961541
args:
site_type1: type of first site (default: 0).
site_type2: type of second site (default: 0).
expand_t: increase orientation points by this factor (default: 1).
expand_z: increase translation points by this factor (default: 1).
beta: see ThermoParams (default: 1).