fix bug where floating point data was formatted as integer since the second column was assumed to be the type
This commit is contained in:
@ -657,11 +657,14 @@ class dump:
|
||||
|
||||
atoms = snap.atoms
|
||||
nvalues = len(atoms[0])
|
||||
keys = dict()
|
||||
for pair in self.names.items():
|
||||
keys[pair[1]] = pair[0]
|
||||
for i in range(snap.natoms):
|
||||
if not snap.aselect[i]: continue
|
||||
line = ""
|
||||
for j in range(nvalues):
|
||||
if (j < 2):
|
||||
if keys[j] == 'id' or keys[j] == 'type' or keys[j] == 'mol':
|
||||
line += str(int(atoms[i][j])) + " "
|
||||
else:
|
||||
line += str(atoms[i][j]) + " "
|
||||
|
||||
Reference in New Issue
Block a user