IMP
2.3.0
The Integrative Modeling Platform
IMP Mainpage
Modules
Applications
Related Pages
Groups
Classes
Files
Examples
Indexes
File List
File Members
CrossLinkMSRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/CrossLinkMSRestraint.h
3
* \brief A pmf based likelihood function
4
* with prior knowledge on the flase positive rate.
5
*
6
* Copyright 2007-2014 IMP Inventors. All rights reserved.
7
*
8
*/
9
10
#ifndef IMPISD_CROSS_LINK_MSRESTRAINT_H
11
#define IMPISD_CROSS_LINK_MSRESTRAINT_H
12
#include "isd_config.h"
13
#include <
IMP/kernel/Restraint.h
>
14
#include <
IMP/kernel/particle_index.h
>
15
16
IMPISD_BEGIN_NAMESPACE
17
/** A restraint for ambiguous cross-linking MS data and multiple state approach.
18
It marginalizes the false positive rate and depends on the expected fpr and
19
an uncertainty parameter beta.
20
*/
21
22
class
IMPISDEXPORT
CrossLinkMSRestraint
:
public
kernel::Restraint
{
23
24
IMP::kernel::ParticleIndexPairs
ppis_;
25
IMP::kernel::ParticleIndexPairs
sigmass_;
26
IMP::kernel::ParticleIndex
lengthi_;
27
IMP::kernel::ParticleIndexes
psis_;
28
double
length_;
29
double
slope_;
30
int
constr_;
31
32
double
sphere_cap(
float
r1,
float
r2,
float
d)
const
;
33
34
public
:
35
//! Create the restraint.
36
/** Restraints should store the particles they are to act on,
37
preferably in a Singleton or PairContainer as appropriate.
38
*/
39
40
CrossLinkMSRestraint
(
IMP::kernel::Model
* m,
double
length,
41
std::string name =
"CrossLinkMSRestraint%1%"
);
42
43
CrossLinkMSRestraint
(
IMP::kernel::Model
* m,
44
IMP::kernel::ParticleIndexAdaptor
lengthi,
45
std::string name =
"CrossLinkMSRestraint%1%"
);
46
47
CrossLinkMSRestraint
(
IMP::kernel::Model
* m,
double
length,
double
slope,
48
std::string name =
"CrossLinkMSRestraint%1%"
);
49
50
void
add_contribution(
const
IMP::kernel::ParticleIndexPair
& pps,
51
const
IMP::kernel::ParticleIndexPair
& sigmas,
52
const
IMP::kernel::ParticleIndex
& psi) {
53
ppis_.push_back(pps);
54
sigmass_.push_back(sigmas);
55
psis_.push_back(psi);
56
}
57
58
double
get_probability()
const
;
59
60
unsigned
int
get_number_of_contributions()
const
{
return
ppis_.size(); }
61
62
/** This macro declares the basic needed methods: evaluate and show
63
*/
64
virtual
double
unprotected_evaluate(
65
IMP::kernel::DerivativeAccumulator
* accum)
const
IMP_OVERRIDE
;
66
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
67
IMP_OBJECT_METHODS
(
CrossLinkMSRestraint
);
68
};
69
70
IMPISD_END_NAMESPACE
71
72
#endif
/* IMPISD_CROSS_LINK_MSRESTRAINT_H */
particle_index.h
Various general useful functions for IMP.
IMP::isd::CrossLinkMSRestraint
Definition:
CrossLinkMSRestraint.h:22
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::base::Vector< ParticleIndexPair >
IMP::base::Array
A class to store an fixed array of same-typed values.
Definition:
Array.h:33
Restraint.h
Abstract base class for all restraints.
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/Restraint.h:52
IMP::base::Index< ParticleIndexTag >
IMP::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:75
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/Model.h:73
IMP::kernel::ParticleIndexAdaptor
Definition:
kernel/particle_index.h:32