8 #ifndef IMPATOM_SECONDARY_STRUCTURE_RESIDUE_H
9 #define IMPATOM_SECONDARY_STRUCTURE_RESIDUE_H
11 #include "atom_config.h"
20 IMPATOM_BEGIN_NAMESPACE
33 if (!Hierarchy::get_is_setup(m, pi)) {
34 Hierarchy::setup_particle(m, pi);
38 ssr.set_prob_helix(prob_helix);
39 ssr.set_prob_strand(prob_strand);
40 ssr.set_prob_coil(prob_coil);
50 Float prob_helix = 1.0 / 3.0, prob_strand = 1.0 / 3.0,
51 prob_coil = 1.0 / 3.0;
53 setup_particle(res_p, prob_helix, prob_strand, prob_coil);
59 if (m->get_has_attribute(get_prob_helix_key(), pi) &&
60 (m->get_has_attribute(get_prob_strand_key(), pi)) &&
61 (m->get_has_attribute(get_prob_coil_key(), pi)))
71 res.push_back(get_prob_helix());
72 res.push_back(get_prob_strand());
73 res.push_back(get_prob_coil());
84 static FloatKey get_prob_helix_key();
85 static FloatKey get_prob_strand_key();
88 IMP_DECORATORS(SecondaryStructureResidue, SecondaryStructureResidues,
100 IMPATOMEXPORT SecondaryStructureResidue
103 bool winner_takes_all_per_res =
115 IMPATOMEXPORT SecondaryStructureResidues
118 int start_res_num,
bool winner_takes_all_per_res =
false);
125 SecondaryStructureResidue ssr2);
127 IMPATOM_END_NAMESPACE
The base class for decorators.
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.
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)
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)
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.
Various important macros for implementing decorators.
#define IMP_DECORATOR_METHODS(Name, Parent)
double Float
Basic floating-point value (could be float, double...)
Class to handle individual model particles.
#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.
#define IMP_DECORATOR_SETUP_3(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name)