Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
elif os.path.exists(filename):
atoms, boxdims, box, triclinic = ptp.read_lammps_dump(filename, compressed=compressed, check_triclinic=True, box_vectors=True, customkeys=customkeys)
self.atoms = atoms
self.box = boxdims
if triclinic:
rot = box.T
rotinv = np.linalg.inv(rot)
self.assign_triclinic_params(rot, rotinv)
else:
raise IOError("input file %s not found"%filename)
elif format == 'poscar':
if os.path.exists(filename):
atoms, boxdims = ptp.read_poscar(filename, compressed=compressed)
self.atoms = atoms
self.box = boxdims
else:
raise IOError("input file %s not found"%filename)
else:
raise TypeError("format recieved an unknown option %s"%format)