9#ifndef IMPATOM_CHARGED_H
10#define IMPATOM_CHARGED_H
12#include <IMP/atom/atom_config.h>
16#include <IMP/internal/constants.h>
21IMPATOM_BEGIN_NAMESPACE
35 do_setup_particle(m, pi, charge);
40 "Particle must already be an XYZ particle");
41 m->add_attribute(get_charge_key(), pi, charge);
53 return XYZ::get_is_setup(m, pi) &&
54 m->get_has_attribute(get_charge_key(), pi);
62 return m->FloatAttributeTable::access_attribute_data(get_charge_key());
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Class for storing model, its restraints, constraints, and particles.
static bool get_is_setup(Model *m, ParticleIndex pi)
Return true if the particle is an instance of a Charged.
static const double * get_charge_array(Model *m)
Access the raw attribute data for the charge.
A decorator for a particle with x,y,z coordinates.
static XYZ setup_particle(Model *m, ParticleIndex pi)
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATOR_GET_SET(name, AttributeKey, Type, ReturnType)
Define methods for getting and setting a particular simple field.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_DECORATOR_SETUP_2(Name, FirstArgumentType, first_argument_name, SecondArgumentType, second_argument_name)
#define IMP_DECORATOR_METHODS(Name, Parent)
Index< ParticleIndexTag > ParticleIndex
double Float
Basic floating-point value (could be float, double...).
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.