Skip to content

Commit 961301a

Browse files
authored
Merge pull request #106 from njzjz/predict
predict MultiSystems
2 parents 2d681a6 + 8fdb102 commit 961301a

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
@@ -1516,6 +1516,15 @@ def from_deepmd_npy(self, folder):
15161516
self.append(LabeledSystem(os.path.join(folder, dd), fmt='deepmd/npy'))
15171517
return self
15181518

1519+
def predict(self, dp):
1520+
import deepmd.DeepPot as DeepPot
1521+
if not isinstance(dp, DeepPot):
1522+
dp = DeepPot(dp)
1523+
new_multisystems = dpdata.MultiSystems()
1524+
for ss in self:
1525+
new_multisystems.append(ss.predict(dp))
1526+
return new_multisystems
1527+
15191528

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

0 commit comments

Comments
 (0)