Skip to content

Commit

Permalink
Add function description: apply_type_map (#646)
Browse files Browse the repository at this point in the history
Add function description on `system.py/check_type_map`
  • Loading branch information
dulinhan authored Apr 25, 2024
1 parent 95241b3 commit f69f6d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dpdata/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,15 @@ def check_type_map(self, type_map):
self.sort_atom_names(type_map=type_map)

def apply_type_map(self, type_map):
"""Customize the element symbol order and it should maintain order
consistency in dpgen or deepmd-kit. It is especially recommended
for multiple complexsystems with multiple elements.
Parameters
----------
type_map : list
type_map
"""
if type_map is not None and isinstance(type_map, list):
self.check_type_map(type_map)
else:
Expand Down

0 comments on commit f69f6d4

Please sign in to comment.