Skip to content
GitLab
Menu
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
c6e082b9
Commit
c6e082b9
authored
Nov 18, 2019
by
cmaffeo2
Browse files
Updated mrdna script to use dimensions of object for system
parent
a80f8bf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/mrdna
View file @
c6e082b9
...
...
@@ -29,6 +29,9 @@ parser.add_argument('--debye-length', type=float, default=None,
parser
.
add_argument
(
'--temperature'
,
type
=
float
,
default
=
295
,
help
=
'Temperature in Kelvin.'
)
parser
.
add_argument
(
'--dimensions'
,
type
=
str
,
default
=
None
,
help
=
'Comma-separated sides of box in Angstroms.'
)
parser
.
add_argument
(
'--sequence-file'
,
type
=
str
,
default
=
None
,
help
=
'Sequence of longest strand.'
)
...
...
@@ -73,6 +76,16 @@ parser.add_argument('input_file', type=str,
args
=
parser
.
parse_args
()
if
args
.
dimensions
is
not
None
:
try
:
tmp
=
[
float
(
f
)
for
f
in
args
.
dimensions
.
split
(
','
)]
if
len
(
tmp
)
!= 3:
raise
ValueError
args
.
dimensions
=
tmp
except
:
raise
ValueError
(
'--dimensions requires a comma separated list of floating point values, not "{}"'
.
format
(
args
.
dimensions
))
def
main
():
infile
=
pathlib
.
Path
(
args
.
input_file
)
try
:
...
...
@@ -91,6 +104,12 @@ def main():
raise
Exception
(
"Unrecognized input file '{}'"
.
format
(
infile
))
model
=
read_model
(
str
(
infile
),
debye_length
=
args
.
debye_length
,
temperature
=
args
.
temperature
)
if
args
.
dimensions
is
None
:
model
.
dimensions
=
[
max
(
f
,
2500
)
for
f
in
model
.
dimensions_from_structure
(
padding_factor
=
2.5
)]
else
:
model
.
dimensions
=
args
.
dimensions
if
args
.
output_prefix
is
not
None
:
prefix
=
args
.
output_prefix
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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