Skip to main content

A lightweight package to parse and process molecular simulation files

Project description

License: Apache 2.0 Build Status codecov

MolTopolParser, abbreviated for Molecular Topology Parser, is a lightweight Python package designed to read and process file formats used in various molecular simulation and modeling software.

Overview

Each module in MolTopolParser handles file formats specific to a type of software. All file data is mapped to Pydantic dataclasses, ensuring data conforms to expected formats and types. This approach provides a solid foundation for building simulation or pipeline tools, while maintaining simplicity and facilitating integration with other tools.

Features

  • Modular Design: Each module corresponds to a specific software's file formats.
  • Pydantic Dataclasses: Ensures data validation and type checking.
  • Class Methods for Parsing: Includes parser functions as class methods for accessing and processing files.
  • Exposed Modules and Dataclasses: All modules and their contained dataclasses are accessible.

Data Hierarchy Model

MolTopolParser provides a three-level data abstraction model to manage the hierarchical nature of simulation data:

Level 1: Base Data

Classes at this level represent individual lines in a file. They focus on the smallest unit of data, providing direct mapping and validation for each line.

Level 2: Aggregation Data (or Aggregation-File Data)

Classes at this level represent a whole section of lines, which could be stored in a standalone file. They group Base Data lines into meaningful sections for easier management and processing.

Level 3: Summarization Data

Classes at this top level usually correspond to an entry or summary file. They gather all available data and provide access to the entire content.

Data Flow Logic

  • Data Declaration and Organization: From top-down.
  • Data Acquisition and Validation: From bottom-up.

The parsing occurs at their corresponding data levels:

  • Summarization Level: Acts as the entry point for the entire system/content. It calls and organizes data from the aggregation level.
  • Aggregation Level: Handles the actual parsing. It functions like a component in a framework, being called by the summarization level to parse and organize data.
  • Base Data Level: Corresponds to the most basic data records.

Parser functions are included as class methods at the aggregation level, while the summarization level calls these methods to parse and organize data. Additionally, the aggregation level can include methods to convertor write out the data after parsing, once the data is organized.

User Guild

Detailed installation and user guide, together with comprehensive example simulations are located in link

example of calling the package module and dataclasses.

Installation

git clone FOLDER
pip install -r requirements.txt
pip install -e .

Dependencies

pydantic 
numpy 

Setup for Developing

cd MolTopolParser
python -m venv .venv 
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
# run test
pytest tests/test_gmx.py -v -s

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moltopolparser-0.0.1a1.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

moltopolparser-0.0.1a1-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file moltopolparser-0.0.1a1.tar.gz.

File metadata

  • Download URL: moltopolparser-0.0.1a1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.13

File hashes

Hashes for moltopolparser-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 4ed6230885ffa30172293c401143dc412476817b193afd97add0cd1a21d56ea3
MD5 604f248c1236f28332b9ecf0f9a8aaa9
BLAKE2b-256 96588df5fb6480d233e1a7dad929455672e4eda5ed3c6041faab4516b2194df5

See more details on using hashes here.

File details

Details for the file moltopolparser-0.0.1a1-py3-none-any.whl.

File metadata

File hashes

Hashes for moltopolparser-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a25a770d2fe12a7ff0c15a134cc01e7f8c7e5d3a9c972e66108cf79b4fc2e9f
MD5 c071d189375a1b62c858708b41eacd8b
BLAKE2b-256 1699c6e6e720df10c6ae0c4ac659d7f4b793da1ecd17ceaac2d6f8890b5ce088

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page