00001 /** 00002 * \file hierarchy_tools.h 00003 * \brief functionality for defining rigid bodies 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPATOM_HIERARCHY_TOOLS_H 00009 #define IMPATOM_HIERARCHY_TOOLS_H 00010 00011 #include "atom_config.h" 00012 #include <IMP/core/XYZR.h> 00013 #include <IMP/atom/Hierarchy.h> 00014 00015 00016 IMPATOM_BEGIN_NAMESPACE 00017 00018 //! Create a coarse grained molecule 00019 /** The coarse grained model is created with a number of spheres 00020 based on the resolution and the volume. If the volume is not provided 00021 it is estimated based on the number of residues. The protein is 00022 created as a molecular hierarchy rooted at p. The leaves are Domain 00023 particles with appropriate residue indexes stored and are XYZR 00024 particles. 00025 00026 Volume is, as usual, in cubic anstroms. 00027 00028 Currently the function creates a set of balls with radii no greater 00029 than resolution which overlap by 20% and have a volume of their 00030 union equal to the passed volume. The balls are held together by 00031 a ConnectivityRestraint with the given spring constant. 00032 00033 The coordinates of the balls defining the protein are optimized 00034 by default, and have garbage coordinate values. 00035 \untested{create_protein} 00036 \unstable{create_protein} 00037 \relatesalso Hierarchy 00038 */ 00039 IMPATOMEXPORT Hierarchy create_protein(Model *m, 00040 double resolution, 00041 int number_of_residues, 00042 int first_residue_index=0, 00043 double volume=-1, 00044 double spring_strength=1); 00045 00046 00047 /** \name Simplification along backbone 00048 00049 These two methods create a simplified version of a molecule by 00050 merging residues sequentially. In one case every n residues are 00051 merged, in the other, the intervals are passed manually. The 00052 resulting molecule is not optimized by default and has no 00053 restraints automatically created. 00054 00055 At the moment, the calls only support unmodified hierarchies loaded 00056 by read_pdb() which have only protein or DNA members. 00057 00058 They return Hierarchy() if the input chain is empty. 00059 @{ 00060 */ 00061 IMPATOMEXPORT Hierarchy create_simplified_along_backbone(Chain in, 00062 int num_res); 00063 00064 IMPATOMEXPORT Hierarchy create_simplified_along_backbone(Chain in, 00065 const IntRanges& residue_segments); 00066 /** @} */ 00067 00068 00069 IMPATOM_END_NAMESPACE 00070 00071 #endif /* IMPATOM_HIERARCHY_TOOLS_H */