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
70017fbc
Commit
70017fbc
authored
7 years ago
by
New Tbgl User
Browse files
Options
Downloads
Patches
Plain Diff
Brough in some changes to cadnano_segments.py from origamitwo server
parent
7415864a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cadnano_segments.py
+10
-20
10 additions, 20 deletions
cadnano_segments.py
run.py
+1
-1
1 addition, 1 deletion
run.py
with
11 additions
and
21 deletions
cadnano_segments.py
+
10
−
20
View file @
70017fbc
...
...
@@ -2,8 +2,10 @@
import
pdb
import
numpy
as
np
import
os
,
sys
from
coords
import
readArbdCoords
,
readAvgArbdCoords
from
glob
import
glob
import
re
from
coords
import
readArbdCoords
,
readAvgArbdCoords
from
segmentmodel
import
SegmentModel
,
SingleStrandedSegment
,
DoubleStrandedSegment
arbd
=
"
/home/cmaffeo2/development/cuda/arbd.dbg/src/arbd
"
# reduced the mem footprint cause vmd
...
...
@@ -276,7 +278,7 @@ def decode_cadnano_part(json_data):
def
package_archive
(
name
,
directory
):
...
def
run_simulation_protocol
(
output_name
,
json_data
,
def
run_simulation_protocol
(
output_name
,
job_id
,
json_data
,
sequence
=
None
,
remove_long_bonds
=
False
,
gpu
=
0
,
...
...
@@ -284,14 +286,14 @@ def run_simulation_protocol( output_name, json_data,
):
coarseSteps
=
1e7
fineSteps
=
1e6
fineSteps
=
1e6
ret
=
None
d_orig
=
os
.
getcwd
()
try
:
if
directory
is
None
:
import
tempfile
directory
=
tempfile
.
mkdtemp
(
prefix
=
'
origami-
'
+
output_name
,
dir
=
'
.
/
'
)
directory
=
tempfile
.
mkdtemp
(
prefix
=
'
origami-
%s-
'
%
job_id
,
dir
=
'
/dev/shm
/
'
)
elif
not
os
.
path
.
exists
(
directory
):
os
.
makedirs
(
directory
)
os
.
chdir
(
directory
)
...
...
@@ -320,8 +322,7 @@ def run_simulation_protocol( output_name, json_data,
# print(sequence)
# for i in sequence:
# print( i, i in ('A','T','C','G') )
# model.strands[0].set_sequence(sequence)
model
.
strands
[
0
].
set_sequence
(
sequence
)
for
s
in
model
.
segments
:
s
.
randomize_unset_sequence
()
...
...
@@ -380,16 +381,8 @@ def run_simulation_protocol( output_name, json_data,
model
.
_generate_atomic_model
(
scale
=
0.25
)
model
.
atomic_simulate
(
outputPrefix
=
full_output_prefix
)
# if not os.path.exists(output_directory):
# os.makedirs(output_directory)
# elif not os.path.isdir(output_directory):
# raise Exception("output_directory '%s' is not a directory!" % output_directory)
ret
=
directory
"""
Package result
"""
ret
=
"
{}@{}:{}
"
.
format
(
os
.
environ
[
"
USER
"
],
os
.
environ
[
"
HOSTNAME
"
],
"
/path/to/archive.tar.gz
"
)
except
:
raise
finally
:
...
...
@@ -405,11 +398,8 @@ def run_simulation_protocol( output_name, json_data,
if
__name__
==
'
__main__
'
:
from
glob
import
glob
import
re
for
f
in
glob
(
'
json/*
'
):
print
(
"
Working on {}
"
.
format
(
f
))
out
=
re
.
match
(
'
json/(.*).json
'
,
f
).
group
(
1
)
data
=
read_json_file
(
f
)
run_simulation_protocol
(
out
,
data
,
gpu
=
0
)
run_simulation_protocol
(
out
,
"
job-id
"
,
data
,
gpu
=
0
)
This diff is collapsed.
Click to expand it.
run.py
+
1
−
1
View file @
70017fbc
...
...
@@ -9,4 +9,4 @@ if __name__ == '__main__':
print
(
"
Working on {}
"
.
format
(
f
))
out
=
re
.
match
(
'
json/(.*).json
'
,
f
).
group
(
1
)
data
=
read_json_file
(
f
)
run_simulation_protocol
(
out
,
data
,
gpu
=
0
)
run_simulation_protocol
(
out
,
"
job-id
"
,
data
,
gpu
=
0
)
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