Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mrdna
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tbgl
tools
mrdna
Commits
5bd0d211
Commit
5bd0d211
authored
5 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Added 'fix_linking_number' option to mrdna script; fixed bug in --debug option
parent
42f941f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/mrdna
+4
-2
4 additions, 2 deletions
bin/mrdna
mrdna/simulate.py
+7
-5
7 additions, 5 deletions
mrdna/simulate.py
with
11 additions
and
7 deletions
bin/mrdna
+
4
−
2
View file @
5bd0d211
...
...
@@ -32,6 +32,8 @@ parser.add_argument('--output-period', type=float, default=1e4,
# help='Simulation steps between DCD frames')
parser
.
add_argument
(
'
--coarse-local-twist
'
,
action
=
'
store_true
'
,
help
=
'
Use local twist for coarsest representation?
'
)
parser
.
add_argument
(
'
--fix-linking-number
'
,
action
=
'
store_true
'
,
help
=
'
Fix the linking number so that it cannot change once local twist is introduced?
'
)
parser
.
add_argument
(
'
--coarse-steps
'
,
type
=
float
,
default
=
1e7
,
help
=
'
Simulation steps for coarse model (200 fs/step)
'
)
parser
.
add_argument
(
'
--fine-steps
'
,
type
=
float
,
default
=
1e7
,
...
...
@@ -81,7 +83,6 @@ def main():
from
mrdna.readers
import
read_atomic_pdb
as
read_model
else
:
raise
Exception
(
"
Unrecognized input file
'
{}
'"
.
format
(
infile
))
model
=
read_model
(
str
(
infile
),
debye_length
=
args
.
debye_length
)
if
args
.
output_prefix
is
not
None
:
...
...
@@ -120,6 +121,7 @@ def main():
gpu
=
args
.
gpu
,
minimization_output_period
=
int
(
args
.
output_period
),
coarse_local_twist
=
args
.
coarse_local_twist
,
fix_linking_number
=
args
.
fix_linking_number
,
coarse_output_period
=
int
(
args
.
output_period
),
fine_output_period
=
int
(
args
.
output_period
),
minimization_steps
=
0
,
# int(args.minimization_steps),
...
...
@@ -148,7 +150,7 @@ if __name__ == '__main__':
while
True
:
try
:
# pdb._runscript(mainpyfile)
self
.
_user_requested_quit
=
False
pdb
.
_user_requested_quit
=
False
pdb
.
runcall
(
main
)
if
pdb
.
_user_requested_quit
:
break
...
...
This diff is collapsed.
Click to expand it.
mrdna/simulate.py
+
7
−
5
View file @
5bd0d211
...
...
@@ -58,6 +58,7 @@ def multiresolution_simulation( model, output_name,
coarse_output_period
=
1e5
,
fine_output_period
=
1e5
,
coarse_local_twist
=
False
,
fix_linking_number
=
False
,
remove_long_bonds
=
False
,
backbone_scale
=
1.0
,
oxdna_steps
=
None
,
...
...
@@ -114,7 +115,7 @@ def multiresolution_simulation( model, output_name,
coarse_model_args
=
dict
(
max_basepairs_per_bead
=
5
,
max_nucleotides_per_bead
=
5
,
local_twist
=
coarse_local_twist
,
escapable_twist
=
True
)
escapable_twist
=
fix_linking_number
)
# TODO: add the output directory in to the readArbdCoords functions or make it an attribute of the model object
...
...
@@ -132,7 +133,7 @@ def multiresolution_simulation( model, output_name,
model
.
generate_bead_model
(
**
coarse_model_args
)
"""
Coarse simulation
"""
simargs
=
dict
(
timestep
=
200e-6
,
output_period
=
coarse_output_period
,
gpu
=
gpu
)
simargs
=
dict
(
timestep
=
150e-6
if
coarse_local_twist
else
200e-6
,
output_period
=
coarse_output_period
,
gpu
=
gpu
)
if
remove_long_bonds
:
run_step
(
num_steps
=
0.05
*
coarse_steps
,
simargs
=
simargs
)
model
.
clear_beads
()
...
...
@@ -143,9 +144,10 @@ def multiresolution_simulation( model, output_name,
"""
Fine simulation
"""
simargs
=
dict
(
timestep
=
40e-6
,
output_period
=
fine_output_period
,
gpu
=
gpu
)
model
.
clear_beads
()
model
.
generate_bead_model
(
1
,
1
,
local_twist
=
True
,
escapable_twist
=
True
)
run_step
(
num_steps
=
fine_steps
,
simargs
=
simargs
,
do_coordinate_average
=
(
fine_steps
>
2
*
fine_output_period
+
1
))
if
not
fix_linking_number
:
model
.
clear_beads
()
model
.
generate_bead_model
(
1
,
1
,
local_twist
=
True
,
escapable_twist
=
True
)
run_step
(
num_steps
=
fine_steps
,
simargs
=
simargs
,
do_coordinate_average
=
(
fine_steps
>
2
*
fine_output_period
+
1
))
"""
Freeze twist
"""
model
.
clear_beads
()
...
...
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
register
or
sign in
to comment