home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.9.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
include
IMP
isd
version 2.9.0
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 false positive rate.
5
*
6
* Copyright 2007-2018 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
bool
get_log_prob_;
32
33
double
sphere_cap(
float
r1,
float
r2,
float
d)
const
;
34
35
public
:
36
//! Create the restraint.
37
CrossLinkMSRestraint
(
IMP::Model
* m,
double
length,
38
bool
get_log_prob =
false
,
39
std::string name =
"CrossLinkMSRestraint%1%"
);
40
41
CrossLinkMSRestraint
(
IMP::Model
* m,
42
IMP::ParticleIndexAdaptor
lengthi,
43
bool
get_log_prob =
false
,
44
std::string name =
"CrossLinkMSRestraint%1%"
);
45
46
CrossLinkMSRestraint
(
IMP::Model
* m,
double
length,
double
slope,
47
bool
get_log_prob =
false
,
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
virtual
double
unprotected_evaluate(
63
IMP::DerivativeAccumulator
* accum)
const
IMP_OVERRIDE
;
64
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
65
IMP_OBJECT_METHODS
(
CrossLinkMSRestraint
);
66
};
67
68
IMPISD_END_NAMESPACE
69
70
#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< 2, ParticleIndex >
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:54