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
e638eb3d
Commit
e638eb3d
authored
Apr 18, 2014
by
Jason Swails
Browse files
Add a more sensible way to set and retrieve box vectors.
parent
6f443013
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
wrappers/python/simtk/openmm/app/charmmpsffile.py
wrappers/python/simtk/openmm/app/charmmpsffile.py
+15
-0
No files found.
wrappers/python/simtk/openmm/app/charmmpsffile.py
View file @
e638eb3d
...
...
@@ -1436,6 +1436,21 @@ class CharmmPsfFile(object):
self
.
box_vectors
[
0
][
2
])
return
None
@
boxLengths
.
setter
def
boxLengths
(
self
,
stuff
):
raise
RuntimeError
(
'Use setBox to set a box with lengths and angles '
'or set the boxVectors attribute with box vectors'
)
@
property
def
boxVectors
(
self
):
""" Return the box vectors """
return
self
.
box_vectors
@
boxVectors
.
setter
def
boxVectors
(
self
,
stuff
):
""" Sets the box vectors """
self
.
box_vectors
=
stuff
def
_box_vectors_from_lengths_angles
(
a
,
b
,
c
,
alpha
,
beta
,
gamma
):
"""
This method takes the lengths and angles from a unit cell and creates unit
...
...
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