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
CysteineCrossLinkRestraint.h
Go to the documentation of this file.
1
/**
2
* \file isd/CysteineCrossLinkRestraint.h
3
* \brief A sigmoid shaped restraint between
4
* residues with discrete classifier
5
* and ambiguous assignment. To be used with
6
* cross-linking mass-spectrometry data.
7
*
8
* Copyright 2007-2013 IMP Inventors. All rights reserved.
9
*
10
*/
11
12
#ifndef IMPISD_CYSTEINE_CROSS_LINK_RESTRAINT_H
13
#define IMPISD_CYSTEINE_CROSS_LINK_RESTRAINT_H
14
#include "isd_config.h"
15
#include <
IMP/kernel/Restraint.h
>
16
#include <
IMP/isd/CrossLinkData.h
>
17
#include <
IMP/isd/CysteineCrossLinkData.h
>
18
19
IMPISD_BEGIN_NAMESPACE
20
/** A restraint for cysteine cross-linking data. It models the
21
frequency fexp derived from gel separation of cross-linked
22
complexes. The experimental frequency fexp is derived as the
23
fraction of dimeric versus monomeric complex, upon cysteine
24
cross-linking. The forward model is derived from free energy
25
calculations. The likelyhood is modeled as a normal distribution
26
function truncated over the interval [0,1]. To contruct the
27
restraint, the class CysteineCrossLinkData and CrossLinkData have
28
to be initialized (see for instance
29
test_CysteineCrossLinkRestraint.py). Input parameters and
30
constructor. There are two different constructors p1 and p2 are
31
the two cross-linked sites. \f$ \beta \f$ is the beta parameter
32
in the distribution function. The \f$ \alpha \f$ parameter is
33
constrained by the condition that the variance is gaussian by the
34
formula \f$ \omega \f$ is a scale factor for the beta parameter,
35
to allow for outlier detection. Usage: Construct the ambiguous
36
set using CysteineCrossLinkRestraint(\f$ \beta \f$, \f$ \omega
37
\f$, xlyield, \f$ f_{exp} \f$) method. The model frequencies of
38
each individual copy are summed, weighted and multiplied by the
39
unknown crosslink yield (epsilon). Pass individual cross-linked
40
pairs to add_contribution(p0, p1, w) command, where "w" is a state
41
weight parameter.
42
*/
43
44
class
IMPISDEXPORT
CysteineCrossLinkRestraint
:
public
kernel::Restraint
45
{
46
kernel::Particles
ps1_;
47
kernel::Particles
ps2_;
48
std::vector<kernel::Particles> pslist1_;
49
std::vector<kernel::Particles> pslist2_;
50
base::Pointer<kernel::Particle>
beta_;
51
base::Pointer<kernel::Particle>
sigma_;
52
base::Pointer<kernel::Particle>
epsilon_;
// k * t at the exponential
53
base::Pointer<kernel::Particle>
weight_;
54
base::PointerMember<CrossLinkData>
data_;
55
base::PointerMember<CysteineCrossLinkData>
ccldata_;
56
int
constr_type_;
57
double
fexp_;
58
bool
use_CA_;
59
60
public
:
61
62
//! Create the restraint.
63
/** kernel::Restraints should store the particles they are to act on,
64
preferably in a Singleton or PairContainer as appropriate.
65
*/
66
CysteineCrossLinkRestraint
(
kernel::Particle
*beta,
kernel::Particle
*sigma,
67
kernel::Particle
*epsilon,
kernel::Particle
*weight,
CrossLinkData
68
*data,
double
fexp);
69
70
CysteineCrossLinkRestraint
(
kernel::Particle
*beta,
kernel::Particle
*sigma,
71
kernel::Particle
*epsilon,
kernel::Particle
*weight,
CrossLinkData
*data,
72
CysteineCrossLinkData
*ccldata);
73
74
/* call for probability */
75
double
get_probability()
const
;
76
77
double
get_standard_error()
const
;
78
79
Floats
get_frequencies()
const
;
80
81
double
get_model_frequency()
const
;
82
83
Floats
get_distances()
const
;
84
85
double
get_truncated_normalization(
double
mean,
double
sigma)
const
;
86
87
double
get_normal_pdf(
double
mean,
double
sigma,
double
x)
const
;
88
89
void
add_contribution(
kernel::Particle
*p1,
kernel::Particle
*p2);
90
void
add_contribution(
kernel::Particles
p1,
kernel::Particles
p2);
91
92
algebra::Vector3D
get_CB_coordinates(
const
kernel::Particles
& ps)
const
;
93
94
unsigned
get_number_of_contributions()
const
;
95
96
/** This macro declares the basic needed methods: evaluate and show
97
*/
98
virtual
double
99
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
100
const IMP_OVERRIDE;
101
virtual IMP::kernel::
ModelObjectsTemp
do_get_inputs() const IMP_OVERRIDE;
102
IMP_OBJECT_METHODS
(
CysteineCrossLinkRestraint
);
103
104
};
105
106
IMPISD_END_NAMESPACE
107
108
#endif
/* IMPISD_CYSTEINE_CROSS_LINK_RESTRAINT_H */
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
CrossLinkData.h
Normal distribution of Function.
IMP::kernel::ModelObjectsTemp
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
Definition:
kernel/base_types.h:82
IMP::base::PointerMember
A smart pointer to a ref-counted Object that is a class memeber.
Definition:
base/Pointer.h:146
IMP::base::Pointer
A smart pointer to a reference counted object.
Definition:
base/Pointer.h:87
IMP::base::Vector< base::Pointer< Particle > >
CysteineCrossLinkData.h
Normal distribution of Function.
Restraint.h
Abstract base class for all restraints.
IMP::algebra::VectorD< 3 >
IMP::isd::CrossLinkData
CrossLinkData.
Definition:
CrossLinkData.h:22
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/declare_Restraint.h:52
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
IMP::isd::CysteineCrossLinkData
CysteineCrossLinkData.
Definition:
CysteineCrossLinkData.h:22
IMP::isd::CysteineCrossLinkRestraint
Definition:
CysteineCrossLinkRestraint.h:44