mdsuite.file_io.lammps_trajectory_files module¶
MDSuite: A Zincwarecode package.
License¶
This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zincwarecode Project.
Contact Information¶
email: zincwarecode@gmail.com github: https://github.com/zincware web: https://zincwarecode.com/
Citation¶
If you use this module please cite us with:
- class mdsuite.file_io.lammps_trajectory_files.LAMMPSTrajectoryFile(file_path: Union[str, Path], trajectory_is_sorted_by_ids=False, custom_data_map: Optional[dict] = None)[source]¶
Bases:
TabularTextFileProcessor
Reader for LAMMPS files.
- mdsuite.file_io.lammps_trajectory_files.extract_properties_from_header(header_property_names: list, database_correspondence_dict: dict) dict [source]¶
Takes the property names from a file header, sees if there is a corresponding mdsuite property in database_correspondence_dict. Returns a dict that links the mdsuite property names to the column indices at which they can be found in the file.
- Parameters:
header_property_names – The names of the columns in the data file
database_correspondence_dict –
The translation between mdsuite properties and the column names of the respective file format. lammps example: {“Positions”: [“x”, “y”, “z”],
”Unwrapped_Positions”: [“xu”, “yu”, “zu”],
- Returns:
trajectory_properties – A dict of the form {‘MDSuite_Property_1’: [column_indices], ‘MDSuite_Property_2’: …} Example {‘Unwrapped_Positions’: [2,3,4], ‘Velocities’: [5,6,8]}
- Return type: