Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tbgl
tools
mrdna
Commits
55af01d1
Commit
55af01d1
authored
Nov 06, 2020
by
cmaffeo2
Browse files
Added external_forces_file option to simulate_oxdna
parent
32ce45a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
mrdna/segmentmodel.py
View file @
55af01d1
...
...
@@ -3803,6 +3803,7 @@ E = 0 0 0
delta_rotation
=
0.22
,
verlet_skin
=
0.5
,
max_backbone_force
=
100
,
external_forces_file
=
None
):
if
seed
is
None
:
...
...
@@ -3852,6 +3853,11 @@ E = 0 0 0
delta_translation
=
''
delta_rotation
=
''
if
external_forces_file
is
None
:
external_forces
=
"external_forces = 0"
else
:
external_forces
=
"external_forces = 1
\n
external_forces_file = {}"
.
format
(
external_forces_file
)
with
open
(
filename
,
'w'
)
as
fh
:
fh
.
write
(
"""##############################
#### PROGRAM PARAMETERS ####
...
...
@@ -3882,6 +3888,8 @@ dt = {timestep}
verlet_skin = {verlet_skin}
{max_backbone_force}
{external_forces}
##############################
#### INPUT / OUTPUT ####
##############################
...
...
@@ -3897,7 +3905,6 @@ energy_file = {log_file}.energy.dat
print_conf_interval = {print_conf_interval}
print_energy_every = {print_energy_every}
time_scale = linear
external_forces = 0
"""
.
format
(
**
locals
()
))
def
simulate_oxdna
(
self
,
output_name
,
directory
=
'.'
,
output_directory
=
'output'
,
topology
=
None
,
configuration
=
None
,
oxDNA
=
None
,
**
oxdna_args
):
...
...
mrdna/simulate.py
View file @
55af01d1
...
...
@@ -54,16 +54,20 @@ def minimize_and_simulate_oxdna( model,
print_energy_every
=
10
,
**
min_args
)
model
.
simulate_oxdna
(
output_name
=
"{}-oxdna"
.
format
(
output_name
),
topology
=
top
,
configuration
=
conf
,
num_steps
=
num_steps
,
print_conf_interval
=
output_period
,
print_energy_every
=
output_period
,
**
oxdna_args
)
top
,
conf
=
model
.
simulate_oxdna
(
output_name
=
"{}-oxdna"
.
format
(
output_name
),
topology
=
top
,
configuration
=
conf
,
num_steps
=
num_steps
,
print_conf_interval
=
output_period
,
print_energy_every
=
output_period
,
**
oxdna_args
)
finally
:
os
.
chdir
(
d_orig
)
try
:
return
top
,
conf
except
:
pass
def
multiresolution_simulation
(
model
,
output_name
,
job_id
=
None
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment