/** * \file hierarchy_tools.h * \brief functionality for defining rigid bodies * * Copyright 2007-2010 IMP Inventors. All rights reserved. */ #ifndef IMPATOM_HIERARCHY_TOOLS_H #define IMPATOM_HIERARCHY_TOOLS_H #include "atom_config.h" #include #include IMPATOM_BEGIN_NAMESPACE //! Create a coarse grained molecule /** The coarse grained model is created with a number of spheres based on the resolution and the volume. If the volume is not provided it is estimated based on the number of residues. The protein is created as a molecular hierarchy rooted at p. The leaves are Domain particles with appropriate residue indexes stored and are XYZR particles. Volume is, as usual, in cubic anstroms. Currently the function creates a set of balls with radii no greater than resolution which overlap by 20% and have a volume of their union equal to the passed volume. The balls are held together by a ConnectivityRestraint with the given spring constant. The coordinates of the balls defining the protein are optimized by default, and have garbage coordinate values. \untested{create_protein} \unstable{create_protein} \relatesalso Hierarchy */ IMPATOMEXPORT Hierarchy create_protein(Model *m, double resolution, int number_of_residues, int first_residue_index=0, double volume=-1, double spring_strength=1); /** \name Simplification along backbone These two methods create a simplified version of a molecule by merging residues sequentially. In one case every n residues are merged, in the other, the intervals are passed manually. The resulting molecule is not optimized by default and has no restraints automatically created. At the moment, the calls only support unmodified hierarchies loaded by read_pdb() which have only protein or DNA members. They return Hierarchy() if the input chain is empty. @{ */ IMPATOMEXPORT Hierarchy create_simplified_along_backbone(Chain in, int num_res); IMPATOMEXPORT Hierarchy create_simplified_along_backbone(Chain in, const IntRanges& residue_segments); /** @} */ IMPATOM_END_NAMESPACE #endif /* IMPATOM_HIERARCHY_TOOLS_H */