Commit e638eb3d authored by Jason Swails's avatar Jason Swails
Browse files

Add a more sensible way to set and retrieve box vectors.

parent 6f443013
...@@ -1436,6 +1436,21 @@ class CharmmPsfFile(object): ...@@ -1436,6 +1436,21 @@ class CharmmPsfFile(object):
self.box_vectors[0][2]) self.box_vectors[0][2])
return None 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): 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 This method takes the lengths and angles from a unit cell and creates unit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment