Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
c212839e
Commit
c212839e
authored
Mar 14, 2015
by
kyleabeauchamp
Browse files
Fix manual unit conversion bug.
parent
4c2be2fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wrappers/python/simtk/openmm/app/dcdfile.py
wrappers/python/simtk/openmm/app/dcdfile.py
+3
-3
No files found.
wrappers/python/simtk/openmm/app/dcdfile.py
View file @
c212839e
...
@@ -121,9 +121,9 @@ class DCDFile(object):
...
@@ -121,9 +121,9 @@ class DCDFile(object):
unitCellDimensions
=
unitCellDimensions
.
value_in_unit
(
nanometers
)
unitCellDimensions
=
unitCellDimensions
.
value_in_unit
(
nanometers
)
boxVectors
=
(
Vec3
(
unitCellDimensions
[
0
],
0
,
0
),
Vec3
(
0
,
unitCellDimensions
[
1
],
0
),
Vec3
(
0
,
0
,
unitCellDimensions
[
2
]))
*
nanometers
boxVectors
=
(
Vec3
(
unitCellDimensions
[
0
],
0
,
0
),
Vec3
(
0
,
unitCellDimensions
[
1
],
0
),
Vec3
(
0
,
0
,
unitCellDimensions
[
2
]))
*
nanometers
(
a_length
,
b_length
,
c_length
,
alpha
,
beta
,
gamma
)
=
computeLengthsAndAngles
(
boxVectors
)
(
a_length
,
b_length
,
c_length
,
alpha
,
beta
,
gamma
)
=
computeLengthsAndAngles
(
boxVectors
)
a_length
=
a_length
/
10.
# computeLengthsAndAngles returns unitless nanometers, but need angstroms here.
a_length
=
a_length
*
10.
# computeLengthsAndAngles returns unitless nanometers, but need angstroms here.
b_length
=
b_length
/
10.
# computeLengthsAndAngles returns unitless nanometers, but need angstroms here.
b_length
=
b_length
*
10.
# computeLengthsAndAngles returns unitless nanometers, but need angstroms here.
c_length
=
c_length
/
10.
# computeLengthsAndAngles returns unitless nanometers, but need angstroms here.
c_length
=
c_length
*
10.
# computeLengthsAndAngles returns unitless nanometers, but need angstroms here.
angle1
=
math
.
sin
(
math
.
pi
/
2
-
gamma
)
angle1
=
math
.
sin
(
math
.
pi
/
2
-
gamma
)
angle2
=
math
.
sin
(
math
.
pi
/
2
-
beta
)
angle2
=
math
.
sin
(
math
.
pi
/
2
-
beta
)
angle3
=
math
.
sin
(
math
.
pi
/
2
-
alpha
)
angle3
=
math
.
sin
(
math
.
pi
/
2
-
alpha
)
...
...
Write
Preview
Markdown
is supported
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