11 #include <util/param/ParamComposite.h> 116 void set(std::string name,
int i,
int j,
double value);
130 double energy(
double rsq,
int i,
int j)
const;
154 double forceOverR(
double rsq,
int i,
int j)
const;
163 double cutoffSq(
int i,
int j)
const;
177 double epsilon(
int i,
int j)
const;
186 double sigma(
int i,
int j)
const;
195 double get(std::string name,
int i,
int j)
const;
261 return eps48_[i][j]*(r6i - 0.5)*r6i*r2i;
double sigmaSq_[MaxAtomType][MaxAtomType]
square of sigma[][].
LJPair()
Default constructor.
double epsilon_[MaxAtomType][MaxAtomType]
LJ interaction energies.
double ljShift_[MaxAtomType][MaxAtomType]
shift in LJ potential.
void setEpsilon(int i, int j, double epsilon)
Set LJ interaction energy for a specific pair of Atom types.
double eps48_[MaxAtomType][MaxAtomType]
48*epsilon
double cutoffSq(int i, int j) const
Get square of cutoff distance for specific type pair.
File containing preprocessor macros for error handling.
int nAtomType_
Total number of atom types.
Classes used by all simpatico molecular simulations.
double sigma(int i, int j) const
Get LJ range for a specific pair of Atom types.
double forceOverR(double rsq, int i, int j) const
Returns ratio of scalar pair interaction force to pair separation.
Saving / output archive for binary ostream.
double epsilon(int i, int j) const
Get LJ interaction energy for a specific pair of Atom types.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
Utility classes for scientific computation.
double sigma_[MaxAtomType][MaxAtomType]
LJ range parameters.
double cutoff_[MaxAtomType][MaxAtomType]
LJ cutoff distance.
double maxPairCutoff() const
Get maximum of pair cutoff distance, for all atom type pairs.
double cutoffSq_[MaxAtomType][MaxAtomType]
square of cutoff[][].
void setSigma(int i, int j, double sigma)
Get LJ range for a specific pair of Atom types.
Saving archive for binary istream.
bool isInitialized_
Was this object initialized by calling (read|load)Parameters ?
A cutoff, shifted Lennard-Jones nonbonded pair interaction.
static const int MaxAtomType
Maximum allowed value for nAtomType (# of atom types)
double maxPairCutoff_
Maximum pair potential cutoff radius, for all monomer type pairs.
LJPair & operator=(const LJPair &other)
Assignment.
void setNAtomType(int nAtomType)
Set nAtomType value.
void readParameters(std::istream &in)
Read epsilon, sigma, and cutoff, and initialize other variables.
An object that can read multiple parameters from file.
double energy(double rsq, int i, int j) const
Returns interaction energy for a single pair of atoms.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.