home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.42a12322a9,2023/03/24
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 20230324.develop.42a12322a9
CysteineCrossLinkRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/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-2022 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 <IMP/isd/isd_config.h>
15
#include <
IMP/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.
21
/** It models the 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 likelihood is modeled as a normal distribution
26
function truncated over the interval [0,1]. To construct 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
Restraint
{
45
ParticleIndexes
ps1_;
46
ParticleIndexes
ps2_;
47
std::vector<ParticleIndexes> pslist1_;
48
std::vector<ParticleIndexes> pslist2_;
49
ParticleIndex
beta_;
50
ParticleIndex
sigma_;
51
ParticleIndex
epsilon_;
// k * t at the exponential
52
ParticleIndex
weight_;
53
PointerMember<CrossLinkData>
data_;
54
PointerMember<CysteineCrossLinkData>
ccldata_;
55
int
constr_type_;
56
double
fexp_;
57
bool
use_CA_;
58
59
public
:
60
//! Create the restraint.
61
CysteineCrossLinkRestraint
(
Model
*m,
ParticleIndexAdaptor
beta,
62
ParticleIndexAdaptor
sigma,
63
ParticleIndexAdaptor
epsilon,
64
ParticleIndexAdaptor
weight,
CrossLinkData
*data,
65
double
fexp);
66
67
CysteineCrossLinkRestraint
(
Model
*m,
ParticleIndexAdaptor
beta,
68
ParticleIndexAdaptor
sigma,
69
ParticleIndexAdaptor
epsilon,
70
ParticleIndexAdaptor
weight,
CrossLinkData
*data,
71
CysteineCrossLinkData
*ccldata);
72
73
/* call for probability */
74
double
get_probability()
const
;
75
76
double
get_standard_error()
const
;
77
78
Floats
get_frequencies()
const
;
79
80
double
get_model_frequency()
const
;
81
82
Floats
get_distances()
const
;
83
84
double
get_truncated_normalization(
double
mean,
double
sigma)
const
;
85
86
double
get_normal_pdf(
double
mean,
double
sigma,
double
x)
const
;
87
88
void
add_contribution(
ParticleIndexAdaptor
p1,
ParticleIndexAdaptor
p2);
89
void
add_contribution(
ParticleIndexes
p1,
ParticleIndexes
p2);
90
91
algebra::Vector3D
get_CB_coordinates(
const
ParticleIndexes
&ps)
const
;
92
93
unsigned
get_number_of_contributions()
const
;
94
95
virtual
double
unprotected_evaluate
(
IMP::DerivativeAccumulator
*accum)
96
const override
;
97
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const override
;
98
IMP_OBJECT_METHODS
(
CysteineCrossLinkRestraint
);
99
};
100
101
IMPISD_END_NAMESPACE
102
103
#endif
/* IMPISD_CYSTEINE_CROSS_LINK_RESTRAINT_H */
CrossLinkData.h
Normal distribution of Function.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::ParticleIndexAdaptor
Take Decorator, Particle or ParticleIndex.
Definition:
particle_index.h:32
IMP::Index< ParticleIndexTag >
IMP::Restraint::unprotected_evaluate
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
IMP::Vector< ParticleIndex >
CysteineCrossLinkData.h
Normal distribution of Function.
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:76
IMP::isd::CrossLinkData
CrossLinkData.
Definition:
CrossLinkData.h:22
IMP::PointerMember
A smart pointer to a ref-counted Object that is a class member.
Definition:
Pointer.h:196
IMP::algebra::Vector3D
VectorD< 3 > Vector3D
Definition:
VectorD.h:421
Restraint.h
Abstract base class for all restraints.
IMP::isd::CysteineCrossLinkData
CysteineCrossLinkData.
Definition:
CysteineCrossLinkData.h:22
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:24
IMP::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
Restraint.h:56
IMP::isd::CysteineCrossLinkRestraint
A restraint for cysteine cross-linking data.
Definition:
CysteineCrossLinkRestraint.h:44