8 #ifndef IMPATOM_CHAIN_H
9 #define IMPATOM_CHAIN_H
11 #include <IMP/atom/atom_config.h>
17 IMPATOM_BEGIN_NAMESPACE
19 typedef Key<IMP_CHAIN_TYPE_INDEX> ChainType;
71 if (!Hierarchy::get_is_setup(m, pi)) {
76 do_setup_particle(m, pi, std::string(1, c));
79 do_setup_particle(m, pi, o.
get_id());
213 IMPATOMEXPORT Chain
get_chain(Hierarchy h);
218 IMPATOM_END_NAMESPACE
The base class for decorators.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
Chain get_chain(Hierarchy h)
Get the containing chain or Chain() if there is none.
const ChainType LPolysaccharide
Polysaccharide(L)
const ChainType Protein
Shorthand for IMP::atom::LPolypeptide.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
Model * get_model() const
Returns the Model containing the particle.
std::string get_sequence() const
Return the primary sequence (or any empty string)
ChainType get_chain_type() const
Return the chain type.
void set_chain_type(ChainType t)
Set the chain type, using IMP::atom::ChainType.
std::string get_id() const
Return the (author-provided) chain id.
void set_sequence(std::string sequence)
Set the primary sequence, as a string.
Various general useful macros for IMP.
A more IMP-like version of the std::vector.
const ChainType UnknownChainType
Unknown chain type.
Class for storing model, its restraints, constraints, and particles.
Decorator for helping deal with a hierarchy of molecules.
const ChainType DPolypeptide
Polypeptide(D)
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
std::string get_label_asym_id() const
Return the mmCIF asym ID.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle attribute with the specified key and initial value
The standard decorator for manipulating molecular structures.
void set_id(std::string c)
Set the (author-provided) chain id.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
set the value of particle attribute with the specified key
void set_sequence_offset(int offset)
Set the offset from the sequence numbering to residue indexes.
void set_uniprot_accession(std::string accession)
Set the UniProt accession for the chain's sequence.
const ChainType DNA
Shorthand for IMP::atom::Polydeoxyribonucleotide.
static bool get_is_setup(Model *m, ParticleIndex p)
Check if the particle has the needed attributes for a cast to succeed.
#define IMP_DECORATOR_METHODS(Name, Parent)
const ChainType RNA
Shorthand for IMP::atom::Polyribonucleotide.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
const ChainType DPolysaccharide
Polysaccharide(D)
std::string get_uniprot_accession() const
Return the UniProt accession for the chain's sequence.
Store info for a chain of a protein.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
const ChainType LPolypeptide
Polypeptide(L)
const ChainType Polydeoxyribonucleotide
DNA.
void set_label_asym_id(std::string c)
Set the mmCIF asym ID.
std::string get_chain_id(Hierarchy h)
Walk up the hierarchy to determine the chain id.
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
get the value of the particle attribute with the specified key
const ChainType Polyribonucleotide
RNA.
int get_sequence_offset() const
Return the offset from the sequence numbering to residue indexes.