Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function description: apply_type_map #646

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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