8 #ifndef IMPATOM_LENNARD_JONES_TYPE_H
9 #define IMPATOM_LENNARD_JONES_TYPE_H
11 #include <IMP/atom/atom_config.h>
17 IMPATOM_BEGIN_NAMESPACE
36 std::string name=
"LennardJonesType%1%");
38 double get_well_depth()
const {
return well_depth_; }
40 void set_well_depth(
double d);
42 double get_radius()
const {
return radius_; }
44 void set_radius(
double r);
54 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
57 class IMPATOMEXPORT LennardJonesParameters :
public Object {
62 std::vector<double> aij_;
65 std::vector<double> bij_;
67 LennardJonesParameters() :
Object(
"LennardJonesParameters %1%") {}
69 int add(LennardJonesType *typ);
71 LennardJonesType *
get(
int index);
74 void precalculate(
int i);
76 int get_parameter_index(
int i,
int j)
const {
80 int maxij = std::max(i, j);
81 int minij = std::min(i, j);
82 return (maxij+1)*maxij / 2 + minij;
87 IMPATOMEXPORT LennardJonesParameters* get_lj_params();
107 "Particle must already be an XYZ particle");
115 return XYZ::get_is_setup(m, pi) &&
124 LennardJonesType* get_type()
const {
126 return internal::get_lj_params()->get(ind);
133 double get_well_depth()
const {
134 return get_type()->get_well_depth();
137 double get_radius()
const {
138 return get_type()->get_radius();
146 return m->IMP::internal::IntAttributeTable::access_attribute_data(
152 static IntKey get_type_key();
157 IMPATOM_END_NAMESPACE
Helper macros for implementing IMP Objects.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
Parameters for a Lennard-Jones interaction.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A decorator for a particle that has a Lennard-Jones potential well.
Model * get_model() const
Returns the Model containing the particle.
A more IMP-like version of the std::vector.
Class for storing model, its restraints, constraints, and particles.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle attribute with the specified key and initial value
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Common base class for heavy weight IMP objects.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
set the value of particle attribute with the specified key
A decorator for a particle with x,y,z coordinates.
int get_index() const
Get the globally unique identifier for this type.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
A nullptr-initialized pointer to an IMP Object.
A shared base class to help in debugging and things.
static const int * get_type_array(Model *m)
Access the raw attribute data for the type.
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
get the value of the particle attribute with the specified key