Skip to content

Commit 8fdb102

Browse files
committed
predict MultiSystems
1 parent bce16bf commit 8fdb102

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dpdata/system.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,15 @@ def from_deepmd_npy(self, folder):
14951495
self.append(LabeledSystem(os.path.join(folder, dd), fmt='deepmd/npy'))
14961496
return self
14971497

1498+
def predict(self, dp):
1499+
import deepmd.DeepPot as DeepPot
1500+
if not isinstance(dp, DeepPot):
1501+
dp = DeepPot(dp)
1502+
new_multisystems = dpdata.MultiSystems()
1503+
for ss in self:
1504+
new_multisystems.append(ss.predict(dp))
1505+
return new_multisystems
1506+
14981507

14991508
def check_System(data):
15001509
keys={'atom_names','atom_numbs','cells','coords','orig','atom_types'}

0 commit comments

Comments
 (0)