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
Import IMP/kernel/Decorator.h in the namespace.
Float get_secondary_structure_match_score(SecondaryStructureResidue ssr1, SecondaryStructureResidue ssr2)
Compares the secondary structure probabilities of two residues.
Import IMP/kernel/base_types.h in the namespace.
Particle * get_particle() const
Returns the particle decorated by this decorator.
SecondaryStructureResidues setup_coarse_secondary_structure_residues(const kernel::Particles &ssr_ps, kernel::Model *mdl, int coarse_factor, int start_res_num, bool winner_takes_all_per_res=false)
static SecondaryStructureResidue setup_particle(kernel::Particle *res_p)
Set up SecondaryStructureResidue with default probabilities.
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_DECORATOR_GET_SET_OPT(name, AttributeKey, Type, ReturnType, default_value)
Define methods for getting and setting an optional simple field.
Floats get_all_probabilities()
Return all probabilities in one vector.
Decorator for helping deal with a hierarchy of molecules.
static bool get_is_setup(kernel::Model *m, kernel::ParticleIndex pi)
Return true if the particle is a secondary structure residue.
Class to handle individual model particles.
Storage of a model, its restraints, constraints and particles.
Classes to handle individual model particles. (Note that implementation of inline functions in in int...
A decorator for a residue with probability of secondary structure.
SecondaryStructureResidue setup_coarse_secondary_structure_residue(const kernel::Particles &ssr_ps, kernel::Model *mdl, bool winner_takes_all_per_res=false)
Coarsen some SecondaryStructureResidues.
Various important macros for implementing decorators.
double Float
Basic floating-point value (could be float, double...)
#define IMP_DECORATOR_SETUP_3(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name)
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
Class for storing model, its restraints, constraints, and particles.