IMP
2.1.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
atom_macros.h
Go to the documentation of this file.
1
/**
2
* \file IMP/atom/atom_macros.h \brief Various important macros
3
* for implementing decorators.
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPATOM_MACROS_H
10
#define IMPATOM_MACROS_H
11
12
#define IMP_ATOM_TYPE_INDEX 8974343
13
#define IMP_RESIDUE_TYPE_INDEX 90784334
14
#define IMP_HIERARCHY_TYPE_INDEX 90784335
15
//! Define the basic things you need for a ForceFieldParameters.
16
/** In addition to the methods done by all the macros, it declares
17
- IMP::Restraint::evaluate()
18
- IMP::Restraint::incremental_evaluate()
19
and it defines
20
- IMP::Restraint::get_is_incremental() to return true
21
*/
22
#define IMP_FORCE_FIELD_PARAMETERS(Name) IMP_OBJECT_NO_WARNING(Name)
23
24
//! Define the basic things you need for a pdb selector
25
/** In addition to the methods defined/declared by IMP_OBJECT,
26
it defines:
27
- IMP::PDBSelector::get_is_selected()
28
The selected argument should return true or false and use
29
a string called pdb_line.
30
*/
31
#define IMP_PDB_SELECTOR(Name, parent, selected, show) \
32
IMPATOM_DEPRECATED_MACRO(2.1, "Expand the macro in place."); \
33
Name(std::string name) : parent(name) {} \
34
Name() : parent(std::string(#Name) + "%1%") {} \
35
bool get_is_selected(const std::string& pdb_line) const { selected; } \
36
IMP_OBJECT_METHODS(Name)
37
38
//! Define the basic things you need for a mol2 selector
39
/** In addition to the methods defined/declared by IMP_OBJECT,
40
it defines:
41
- IMP::Mol2Selector::get_is_selected()
42
The selected argument should return true or false and use
43
a string called pdb_line.
44
*/
45
#define IMP_MOL2_SELECTOR(Name, selected, show) \
46
bool get_is_selected(const std::string& mol2_line) const { selected; } \
47
IMP_OBJECT_METHODS(Name)
48
49
/** Add the methods needed for a Simulator
50
*/
51
#define IMP_SIMULATOR(Name) \
52
IMPATOM_DEPRECATED_MACRO(2.1, "Expand the macro in place."); \
53
\
54
private: \
55
virtual void setup(const kernel::ParticleIndexes& ps); \
56
virtual double do_step(const kernel::ParticleIndexes& sc, double dt); \
57
virtual bool get_is_simulation_particle(kernel::ParticleIndex p) const; \
58
\
59
public:
60
61
#endif
/* IMPATOM_MACROS_H */