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. While something resembling a Fibonacci lattice could more uniformly represent a spherical surface, 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 separated by spaces. 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 for i==j, and (k+1)^2(2k+1)^3 lines for i!=j, 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]. If the orientation is duplicate, then the first number is 1 and the second is the integer number of the orientation that it is a duplicate of.
Arguments
table_file: table file with format described above.
ignore_energy: do not read the energy table (default: false).