A simple example using is
import IMP
import IMP.core
import IMP.atom
import IMP.atom
import IMP.helper
m= IMP.Model()
prot= IMP.atom.read_pdb(IMP.core.get_example_path('example_protein.pdb'), m)
res= IMP.atom.get_by_type(prot, IMP.atom.RESIDUE_TYPE)
for p in res:
IMP.core.XYZR.setup_particle(p.get_particle())
mtr=IMP.atom.Hierarchy.get_traits()
pr= IMP.core.ChildrenRefiner(mtr)
for r in res:
IMP.core.Cover.setup_particle(r.get_particle(), pr)
m.evaluate(False)

Public Member Functions | |
| ChildrenRefiner (HierarchyTraits tr) | |
| Create a refiner for a particular type of hierarchy. | |
| virtual bool | get_can_refine (Particle *) const |
| virtual ContainersTemp | get_input_containers (Particle *p) const |
| virtual ParticlesTemp | get_input_particles (Particle *p) const |
| virtual unsigned int | get_number_of_refined (Particle *) const |
| virtual const ParticlesTemp | get_refined (Particle *) const |
| virtual Particle * | get_refined (Particle *, unsigned int) const |
| virtual std::string | get_type_name () const |
| virtual ::IMP::VersionInfo | get_version_info () const |
Friends | |
| template<class T > | |
| void | IMP::internal::unref (T *) |