IMP  2.2.1
The Integrative Modeling Platform
restraint_io.h
Go to the documentation of this file.
1 /**
2  * \file IMP/rmf/restraint_io.h
3  * \brief Handle read/write of kernel::Model data from/to files.
4  *
5  * Copyright 2007-2014 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPRMF_RESTRAINT_IO_H
10 #define IMPRMF_RESTRAINT_IO_H
11 
12 #include <IMP/rmf/rmf_config.h>
13 #include "link_macros.h"
14 #include <IMP/base/object_macros.h>
15 #include <IMP/kernel/Restraint.h>
16 
17 IMPRMF_BEGIN_NAMESPACE
18 
19 /** \name kernel::Restraint I/O
20  kernel::Restraints are written as am RMF::FEATURE node with subnodes for
21  the decomposed restraints
22  (kernel::Restraint::create_current_decompositon()).
23  The kernel::Restraints::get_last_score() value is what is saved to the file,
24  so make sure that the restraints have been evaluated before saving
25  a frame.
26 
27  Any particles returnd by kernel::Restraint::get_input_particles() that are
28  also linked in the RMF file will be included in the RMF file as
29  inputs for the kernel::Restraint. This allows external software like e.g.,
30  Chimera to associate these restrains with a certain set of particles.
31  @{
32 */
33 IMP_DECLARE_LINKERS(Restraint, restraint, restraints, kernel::Restraint *,
35  (RMF::FileConstHandle fh, kernel::Model *m), );
36 
37 /** Add a list of restraints to the file as (static) bonds. There restraints
38  * must decompose into pairwise restraints. Their scores will not be recorded in
39  * the file. */
40 IMPRMFEXPORT void add_restraints_as_bonds(RMF::FileHandle fh,
41  const kernel::Restraints &rs);
42 
43 /** Certain restraint are made from a really large number of terms.
44  Tracking and displaying all those
45  terms can be very time consuming. If the number of terms is larger
46  than the maximum, the terms are not displayed. By default this is 100.*/
47 IMPRMFEXPORT void set_maximum_number_of_terms(RMF::FileHandle fh,
48  unsigned int num);
49 /** @} */
50 
51 IMPRMF_END_NAMESPACE
52 
53 #endif /* IMPRMF_RESTRAINT_IO_H */
IMP::base::Vector< IMP::base::Pointer< Restraint > > Restraints
Abstract base class for all restraints.
IMP::kernel::Model Model
void set_maximum_number_of_terms(RMF::FileHandle fh, unsigned int num)
void add_restraints_as_bonds(RMF::FileHandle fh, const kernel::Restraints &rs)
Various general useful macros for IMP.
IMP::kernel::Restraint Restraint