structure_group¶
Module to group structures from different database
Functions
|
Create a list of structures from the input file. |
|
Main function to process structures from an input file, group them into unique structures, and write the results to an output file. |
|
Read structure from a file. |
|
Write unique structures to an output file and copy files to a directory. |
- structure_group.read_structure_file(filepath)[source]¶
Read structure from a file.
- Parameters:
filepath (str) – Path to the structure file.
- Returns:
Pymatgen Structure object.
- Return type:
Structure
- structure_group.create_structure_list(input_file)[source]¶
Create a list of structures from the input file.
- Parameters:
input_file (str) – Path to the input file.
- Returns:
List of Pymatgen Structure objects.
- Return type:
list
- structure_group.write_unique_structures(unique_structures, output_file)[source]¶
Write unique structures to an output file and copy files to a directory.
- Parameters:
unique_structures (list) – List of unique Pymatgen Structure objects.
output_file (str) – Path to the output file.
- structure_group.main()[source]¶
Main function to process structures from an input file, group them into unique structures, and write the results to an output file.
Reads structure information from the ‘mpid.in’ file, creates a list of structures, groups them into unique structures using StructureMatcher, and writes the unique structures along with associated metadata to the ‘mpid-new.in’ file.
- Returns:
None