8 #ifndef IMPATOM_SECONDARY_STRUCTURE_RESIDUE_H
9 #define IMPATOM_SECONDARY_STRUCTURE_RESIDUE_H
11 #include <IMP/atom/atom_config.h>
20 IMPATOM_BEGIN_NAMESPACE
33 if (!Hierarchy::get_is_setup(m, pi)) {
34 Hierarchy::setup_particle(m, pi);
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);
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();
103 bool winner_takes_all_per_res =
118 int start_res_num,
bool winner_takes_all_per_res =
false);
127 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 atribute with the specied 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.
Various important macros for implementing decorators.
#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)