11#include <IMP/atom/atom_config.h>
17IMPATOM_BEGIN_NAMESPACE
19typedef Key<IMP_CHAIN_TYPE_INDEX>
ChainType;
37IMPATOMEXPORT
extern const ChainType UnknownChainType;
39IMPATOMEXPORT
extern const ChainType DPolypeptide;
41IMPATOMEXPORT
extern const ChainType LPolypeptide;
43IMPATOMEXPORT
extern const ChainType Polydeoxyribonucleotide;
45IMPATOMEXPORT
extern const ChainType Polyribonucleotide;
47IMPATOMEXPORT
extern const ChainType DPolysaccharide;
49IMPATOMEXPORT
extern const ChainType LPolysaccharide;
51IMPATOMEXPORT
extern const ChainType Protein;
61class IMPATOMEXPORT Chain :
public Hierarchy {
76 do_setup_particle(m, pi, std::string(1, c));
79 do_setup_particle(m, pi, o.get_id());
89 return m->get_has_attribute(
get_id_key(), pi) &&
The base class for decorators.
Decorator for helping deal with a hierarchy of molecules.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
Model * get_model() const
Returns the Model containing the particle.
Class for storing model, its restraints, constraints, and particles.
Store info for a chain of a protein.
static SparseStringKey get_uniprot_accession_key()
The key used to store the UniProt accession.
void set_sequence_offset(int offset)
Set the offset from the sequence numbering to residue indexes.
static SparseStringKey get_label_asym_id_key()
The key used to store the mmCIF asym ID.
static SparseIntKey get_chain_type_key()
The key used to store the polymer type.
ChainType get_chain_type() const
Return the chain type.
void set_sequence(std::string sequence)
Set the primary sequence, as a string.
std::string get_label_asym_id() const
Return the mmCIF asym ID.
void set_id(std::string c)
Set the (author-provided) chain id.
std::string get_id() const
Return the (author-provided) chain id.
static SparseIntKey get_sequence_offset_key()
The key used to store the sequence offset.
void set_chain_type(ChainType t)
Set the chain type, using IMP::atom::ChainType.
static SparseStringKey get_id_key()
The key used to store the author-provided chain ID.
std::string get_sequence() const
Return the primary sequence (or any empty string).
void set_label_asym_id(std::string c)
Set the mmCIF asym ID.
std::string get_uniprot_accession() const
Return the UniProt accession for the chain's sequence.
int get_sequence_offset() const
Return 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.
static SparseStringKey get_sequence_key()
The key used to store the primary sequence.
The standard decorator for manipulating molecular structures.
static bool get_is_setup(Model *m, ParticleIndex p)
Check if the particle has the needed attributes for a cast to succeed.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_DECORATOR_METHODS(Name, Parent)
Various general useful macros for IMP.
Chain get_chain(Hierarchy h)
Get the containing chain or Chain() if there is none.
const ChainType UnknownChainType
Unknown chain type.
IMP::Vector< ChainType > ChainTypes
std::string get_chain_id(Hierarchy h)
Walk up the hierarchy to determine the chain id.
Index< ParticleIndexTag > ParticleIndex
Key< 12 > SparseStringKey
The type used to identify sparse string attributes in the Particles.
Key< 13 > SparseIntKey
The type used to identify sparse int attributes in the Particles.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.