Skip to content

Commit 88bff6f

Browse files
authored
Update raw.py
1 parent c3451a2 commit 88bff6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dpdata/deepmd/raw.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ def dump (folder, data) :
6969
np.savetxt(os.path.join(folder, 'force.raw'), np.reshape(data['forces'], [nframes, -1]))
7070
if 'virials' in data :
7171
np.savetxt(os.path.join(folder, 'virial.raw'), np.reshape(data['virials'], [nframes, 9]))
72+
try:
73+
os.remove(os.path.join(folder, "nopbc"))
74+
except OSError:
75+
pass
7276
if data.get("nopbc", False):
7377
os.mknod(os.path.join(folder, "nopbc"))
7478

0 commit comments

Comments
 (0)