24 UTIL_THROW(
"nAtomType must be set before readParam");
28 readCArray2D<double>(in,
"epsilon",
epsilon_[0],
30 readCArray2D<double>(in,
"sigma",
sigma_[0],
40 cutoff_[i][j] = sigma_[i][j]*pow(2.0, 1.0/6.0);
42 sigmaSq_[i][j] = sigma_[i][j]*sigma_[i][j];
50 ljShift_[i][j] = -4.0*epsilon_[i][j]*(r6i*r6i - r6i);
52 eps48_[i][j] = 48.0*epsilon_[i][j];
63 if (name ==
"epsilon") {
double sigmaSq_[MaxAtomType][MaxAtomType]
square of sigma[][].
void set(std::string name, int i, int j, double value)
Modify a parameter, identified by a string.
double epsilon_[MaxAtomType][MaxAtomType]
LJ interaction energies.
double ljShift_[MaxAtomType][MaxAtomType]
shift in LJ potential.
double eps48_[MaxAtomType][MaxAtomType]
48*epsilon
int nAtomType_
Total number of atom types.
Classes used by all simpatico molecular simulations.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
void readParameters(std::istream &in)
Read epsilon and sigma, initialize other variables.
Utility classes for scientific computation.
double sigma_[MaxAtomType][MaxAtomType]
LJ range parameters.
double cutoff_[MaxAtomType][MaxAtomType]
LJ cutoff distance.
double cutoffSq_[MaxAtomType][MaxAtomType]
square of cutoff[][].
bool isInitialized_
Was this object initialized by calling (read|load)Parameters ?
static const int MaxAtomType
Maximum allowed value for nAtomType (# of atom types)
double maxPairCutoff_
Maximum pair potential cutoff radius, for all monomer type pairs.