9 #ifndef IMPATOM_SECONDARY_STRUCTURE_RESIDUE_H
10 #define IMPATOM_SECONDARY_STRUCTURE_RESIDUE_H
12 #include <IMP/atom/atom_config.h>
21 IMPATOM_BEGIN_NAMESPACE
34 if (!Hierarchy::get_is_setup(m, pi)) {
35 Hierarchy::setup_particle(m, pi);
51 Float prob_helix = 1.0 / 3.0, prob_strand = 1.0 / 3.0,
52 prob_coil = 1.0 / 3.0;
54 setup_particle(res_p, prob_helix, prob_strand, prob_coil);
72 res.push_back(get_prob_helix());
73 res.push_back(get_prob_strand());
74 res.push_back(get_prob_coil());
85 static FloatKey get_prob_helix_key();
86 static FloatKey get_prob_strand_key();
104 bool winner_takes_all_per_res =
119 int start_res_num,
bool winner_takes_all_per_res =
false);
128 IMPATOM_END_NAMESPACE
The base class for decorators.
void set_prob_strand(Float t)
Float get_secondary_structure_match_score(SecondaryStructureResidue ssr1, SecondaryStructureResidue ssr2)
Compares the secondary structure probabilities of two residues.
#define IMP_DECORATOR_GET_SET_OPT(name, AttributeKey, Type, ReturnType, default_value)
Define methods for getting and setting an optional simple field.
Storage of a model, its restraints, constraints and particles.
void set_prob_coil(Float t)
Class for storing model, its restraints, constraints, and particles.
Floats get_all_probabilities()
Return all probabilities in one vector.
Decorator for helping deal with a hierarchy of molecules.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle attribute with the specified key and initial value
SecondaryStructureResidue setup_coarse_secondary_structure_residue(const Particles &ssr_ps, Model *mdl, bool winner_takes_all_per_res=false)
Coarsen some SecondaryStructureResidues.
Particle * get_particle() const
Returns the particle decorated by this decorator.
SecondaryStructureResidues setup_coarse_secondary_structure_residues(const Particles &ssr_ps, Model *mdl, int coarse_factor, int start_res_num, bool winner_takes_all_per_res=false)
Interface to specialized Particle types (e.g. atoms)
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
A decorator for a residue with probability of secondary structure.
Macros for maintaining molecular hierarchies.
#define IMP_DECORATOR_METHODS(Name, Parent)
double Float
Basic floating-point value (could be float, double...)
void set_prob_helix(Float t)
Class to handle individual particles of a Model object.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
static bool get_is_setup(Model *m, ParticleIndex pi)
Return true if the particle is a secondary structure residue.
static SecondaryStructureResidue setup_particle(Particle *res_p)
Set up SecondaryStructureResidue with default probabilities.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
#define IMP_DECORATOR_SETUP_3(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name)