home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.5.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
include
IMP
isd
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-2015 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/Restraint.h
>
14
#include <
IMP/particle_index.h
>
15
16
IMPISD_BEGIN_NAMESPACE
17
18
//! A restraint for ambiguous cross-linking MS data and multiple state approach.
19
/** It marginalizes the false positive rate and depends on the expected fpr and
20
an uncertainty parameter beta.
21
*/
22
class
IMPISDEXPORT
CrossLinkMSRestraint
:
public
Restraint
{
23
24
IMP::ParticleIndexPairs
ppis_;
25
IMP::ParticleIndexPairs
sigmass_;
26
IMP::ParticleIndex
lengthi_;
27
IMP::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::Model
* m,
double
length,
41
std::string name =
"CrossLinkMSRestraint%1%"
);
42
43
CrossLinkMSRestraint
(
IMP::Model
* m,
44
IMP::ParticleIndexAdaptor
lengthi,
45
std::string name =
"CrossLinkMSRestraint%1%"
);
46
47
CrossLinkMSRestraint
(
IMP::Model
* m,
double
length,
double
slope,
48
std::string name =
"CrossLinkMSRestraint%1%"
);
49
50
void
add_contribution(
const
IMP::ParticleIndexPair
& pps,
51
const
IMP::ParticleIndexPair
& sigmas,
52
IMP::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::DerivativeAccumulator
* accum)
const
IMP_OVERRIDE
;
66
virtual
IMP::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 */
IMP::isd::CrossLinkMSRestraint
A restraint for ambiguous cross-linking MS data and multiple state approach.
Definition:
CrossLinkMSRestraint.h:22
particle_index.h
Various general useful functions for IMP.
IMP::Array
A class to store an fixed array of same-typed values.
Definition:
Array.h:33
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::ParticleIndexAdaptor
Definition:
particle_index.h:32
IMP::Index< ParticleIndexTag >
IMP::Vector< ParticleIndexPair >
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
Restraint.h
Abstract base class for all restraints.
IMP::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:80
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:25
IMP::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
Restraint.h:52