"platforms/brook/src/BrookInitializeForcesKernel.cpp" did not exist on "5d9ae8100f91c227fa97a4c01956668ff3b75775"
Commit 5cf7f74c authored by Jason Swails's avatar Jason Swails
Browse files

Add a natom attribute to AmberNetcdfRestart.

parent d3fd7d5a
...@@ -1173,6 +1173,7 @@ class AmberNetcdfRestart(object): ...@@ -1173,6 +1173,7 @@ class AmberNetcdfRestart(object):
# accidentally leaks the file handle, but that was 'fixed' in 0.13. This # accidentally leaks the file handle, but that was 'fixed' in 0.13. This
# fix taken from MDTraj # fix taken from MDTraj
with NetCDFFile(filename, 'r') as ncfile: with NetCDFFile(filename, 'r') as ncfile:
self.natom = ncfile.dimensions['atom']
self.coordinates = np.array(ncfile.variables['coordinates'][:]) self.coordinates = np.array(ncfile.variables['coordinates'][:])
if 'velocities' in ncfile.variables: if 'velocities' in ncfile.variables:
vels = ncfile.variables['velocities'] vels = ncfile.variables['velocities']
......
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