File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import re
33
44import numpy as np
5- from scipy .io import netcdf
5+ from scipy .io import netcdf_file
66
77from dpdata .amber .mask import pick_by_amber_mask
88from dpdata .unit import EnergyConversion
@@ -77,7 +77,7 @@ def read_amber_traj(
7777 for ii in use_element_symbols :
7878 amber_types [ii ] = symbols [atomic_number [ii ]]
7979
80- with netcdf . netcdf_file (nc_file , "r" ) as f :
80+ with netcdf_file (nc_file , "r" ) as f :
8181 coords = np .array (f .variables ["coordinates" ][:])
8282 cell_lengths = np .array (f .variables ["cell_lengths" ][:])
8383 cell_angles = np .array (f .variables ["cell_angles" ][:])
@@ -92,7 +92,7 @@ def read_amber_traj(
9292 raise RuntimeError ("Unsupported cells" )
9393
9494 if labeled :
95- with netcdf . netcdf_file (mdfrc_file , "r" ) as f :
95+ with netcdf_file (mdfrc_file , "r" ) as f :
9696 forces = np .array (f .variables ["forces" ][:])
9797
9898 # load energy from mden_file or mdout_file
You can’t perform that action at this time.
0 commit comments