Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
ProMod3
Commits
72b56a1a
Commit
72b56a1a
authored
Mar 30, 2015
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
make rigidity of stem residues optional in BackboneRelaxer
parent
318d10f8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
loop/pymod/export_loop_closure.cc
+12
-1
12 additions, 1 deletion
loop/pymod/export_loop_closure.cc
loop/src/backbone_relaxer.cc
+19
-12
19 additions, 12 deletions
loop/src/backbone_relaxer.cc
loop/src/backbone_relaxer.hh
+4
-2
4 additions, 2 deletions
loop/src/backbone_relaxer.hh
with
35 additions
and
15 deletions
loop/pymod/export_loop_closure.cc
+
12
−
1
View file @
72b56a1a
...
...
@@ -90,6 +90,16 @@ boost::python::list KIC_VecList(const promod3::loop::BackboneList& bb_list, cons
return
return_list
;
}
//wrapper for BackboneRelaxer constructor
//promod3::loop::BackboneRelaxerPtr BBRelaxerWrapper(const promod3::loop::BackboneList& bb_list,
// const ost::mol::mm::MMSettingsPtr settings,
// bool fix_nterm, bool fix_cterm){
// promod3::loop::BackboneRelaxerPtr
// p(new promod3::loop::BackboneRelaxer(bb_list,settings,
// fix_nterm,fix_cterm));
// return p;
//}
}
void
export_LoopClosure
(){
...
...
@@ -107,7 +117,8 @@ void export_LoopClosure(){
def
(
"KIC"
,
&
KIC_ResidueHandle
,(
arg
(
"n_stem"
),
arg
(
"c_stem"
),
arg
(
"pivot_one"
),
arg
(
"pivot_two"
),
arg
(
"pivot_three"
)));
def
(
"KIC"
,
&
KIC_VecList
,(
arg
(
"n_stem_positions"
),
arg
(
"c_stem_positions"
),
arg
(
"pivot_one"
),
arg
(
"pivot_two"
),
arg
(
"pivot_three"
)));
class_
<
BackboneRelaxer
>
(
"BackboneRelaxer"
,
init
<
const
BackboneList
&
,
ost
::
mol
::
mm
::
MMSettingsPtr
>
())
class_
<
BackboneRelaxer
>
(
"BackboneRelaxer"
,
init
<
const
BackboneList
&
,
ost
::
mol
::
mm
::
MMSettingsPtr
,
optional
<
bool
,
bool
>
>
())
//.def("__init__",make_constructor(&BBRelaxerWrapper))
.
def
(
"Run"
,
&
BackboneRelaxer
::
Run
,(
arg
(
"bb_list"
),
arg
(
"steps"
)
=
100
,
arg
(
"stop_criterion"
)
=
0.01
))
;
...
...
...
...
This diff is collapsed.
Click to expand it.
loop/src/backbone_relaxer.cc
+
19
−
12
View file @
72b56a1a
...
...
@@ -8,7 +8,8 @@ namespace promod3 { namespace loop {
BackboneRelaxer
::
BackboneRelaxer
(
const
BackboneList
&
bb_list
,
ost
::
mol
::
mm
::
MMSettingsPtr
settings
){
ost
::
mol
::
mm
::
MMSettingsPtr
settings
,
bool
fix_nterm
,
bool
fix_cterm
){
if
(
bb_list
.
size
()
<
2
){
throw
promod3
::
Error
(
"bb_list must be at least of length 2 for BackboneRelaxer!"
);
...
...
@@ -23,7 +24,8 @@ BackboneRelaxer::BackboneRelaxer(const BackboneList& bb_list,
}
ost
::
mol
::
mm
::
TopologyPtr
top
=
CreateBBListTop
(
bb_list
,
settings
->
forcefield
);
ost
::
mol
::
mm
::
TopologyPtr
top
=
CreateBBListTop
(
bb_list
,
settings
->
forcefield
,
fix_nterm
,
fix_cterm
);
positions_
.
resize
(
top
->
GetNumParticles
());
...
...
@@ -154,7 +156,8 @@ void BackboneRelaxer::ExtractSimulationPositions(BackboneList& bb_list){
ost
::
mol
::
mm
::
TopologyPtr
BackboneRelaxer
::
CreateBBListTop
(
const
BackboneList
&
bb_list
,
ost
::
mol
::
mm
::
ForcefieldPtr
ff
){
ost
::
mol
::
mm
::
ForcefieldPtr
ff
,
bool
fix_nterm
,
bool
fix_cterm
){
std
::
vector
<
String
>
atom_types
;
std
::
vector
<
Real
>
masses
;
...
...
@@ -223,16 +226,20 @@ ost::mol::mm::TopologyPtr BackboneRelaxer::CreateBBListTop(const BackboneList& b
charges
.
push_back
(
0.0
);
//let's neglect electrostatic interactions
}
if
(
fix_nterm
){
//set nterm rigid but let the c and o atoms move...
masses
[
0
]
=
0.0
;
masses
[
1
]
=
0.0
;
if
(
bb_list
[
0
].
aa
!=
ost
::
conop
::
GLY
)
masses
[
2
]
=
0.0
;
}
if
(
fix_cterm
){
//set cterm rigid but let the n atom move
masses
[
masses
.
size
()
-
1
]
=
0.0
;
masses
[
masses
.
size
()
-
2
]
=
0.0
;
masses
[
masses
.
size
()
-
3
]
=
0.0
;
if
(
bb_list
.
back
().
aa
!=
ost
::
conop
::
GLY
)
masses
[
masses
.
size
()
-
4
]
=
0.0
;
}
//initialize mm-topology
ost
::
mol
::
mm
::
TopologyPtr
top
(
new
ost
::
mol
::
mm
::
Topology
(
masses
));
...
...
...
...
This diff is collapsed.
Click to expand it.
loop/src/backbone_relaxer.hh
+
4
−
2
View file @
72b56a1a
...
...
@@ -16,7 +16,8 @@ struct BackboneRelaxer;
typedef
boost
::
shared_ptr
<
BackboneRelaxer
>
BackboneRelaxerPtr
;
struct
BackboneRelaxer
{
BackboneRelaxer
(
const
BackboneList
&
bb
,
ost
::
mol
::
mm
::
MMSettingsPtr
settings
);
BackboneRelaxer
(
const
BackboneList
&
bb
,
ost
::
mol
::
mm
::
MMSettingsPtr
settings
,
bool
fix_nterm
=
true
,
bool
fix_c_term
=
true
);
Real
Run
(
BackboneList
&
bb_list
,
int
steps
=
100
,
Real
stop_criterion
=
0.01
);
private:
...
...
@@ -30,7 +31,8 @@ private:
void
ExtractSimulationPositions
(
BackboneList
&
bb_list
);
ost
::
mol
::
mm
::
TopologyPtr
CreateBBListTop
(
const
BackboneList
&
bb_list
,
ost
::
mol
::
mm
::
ForcefieldPtr
ff
);
ost
::
mol
::
mm
::
ForcefieldPtr
ff
,
bool
fix_nterm
,
bool
fix_cterm
);
std
::
vector
<
ost
::
conop
::
AminoAcid
>
s_
;
ost
::
mol
::
mm
::
SimulationPtr
simulation_
;
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment