https://github.com/xinmengbcr/moltopolparser

A lightweight package to parse and process molecular simulation files

https://github.com/xinmengbcr/moltopolparser

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.7%) to scientific vocabulary

Keywords

computational-chemistry molecular-dynamics molecular-simulations parser python
Last synced: 5 months ago · JSON representation

Repository

A lightweight package to parse and process molecular simulation files

Basic Info
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
computational-chemistry molecular-dynamics molecular-simulations parser python
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

License: Apache 2.0 Build Status codecov PyPI version Pydantic v2

MolTopolParser, abbreviated from Molecular Topology Parser, is a lightweight, open-source Python package designed for accessing, validating, and processing files or data from various molecular simulation and modeling software. It simplifies interfacing between different simulation software and is pivotal in building computational pipelines for molecular simulations.

Installation

Requirements

  • Python 3.6 or newer

  • pip package manager

Quick Start

To install MolTopolParser, run the following command:

bash pip install moltopolparser

Dependencies

MolTopolParser requires the following Python packages:

These dependencies are automatically installed during the MolTopolParser installation process.

Features

  • Modular Design: Structured around specific file formats from various simulation software, enhancing maintainability and scalability.

  • Pydantic Dataclasses: Ensures robust data validation and type checking across the package.

  • Parsing as Class Methods: Facilitates easy access to and manipulation of simulation files through well-defined class methods.

  • Exposed Modules and Dataclasses: Enables advanced users to extend functionality or integrate with other tools.

When To Use

MolTopolParser is designed for developers to manage hierarchical data structures commonly used in molecular simulations. It provides a robust foundation for building advanced simulation tools and pipelines.

Use Cases:

  • Accessing and manipulating simulation files beyond mere coordinate data.

  • Interfacing between different molecular simulation software.

  • Building and managing computational pipelines.

Not Suitable For:

  • Simple parsing of structural data.

  • Basic analysis of simulation outputs. (Consider using Biopython , MDAanalysis etc.)

Usage Examples

Parsing Gromacs Files

```python import moltopolparser as mtp

Validate base data directly

atomdata = { "id": 10, "atomtype": "C", "resnr": 100, "residu": "UREA", "atom": "C1", "cgnr": 1, "charge": -0.683, } atom = mtp.gmx.MolTopAtom(**atom_data) print(atom.charge)

Parsing a single .gro file

grofile = '../tests/data/gmx/twowater.gro' gro = mtp.gmx.GroFile.parser(grofile) print(gro.boxsize)

Parsing and accessing a top file

topfile = '../tests/data/gmx/membrane-martini-charmmgui/system.top' systop = mtp.gmx.Topology.parser(topfile) print(systop.system)

systop.pullforcefield() print(systop.forcefield.atomtypes[0]) # Output: name='P5' atnum=None mass=72.0 charge=0.0 ptype='A' sigma=0.0 epsilon=0.0

systop.pullmoleculetopologies() print(systop.molecule_topologies[0]) ```

Contributing

We encourage contributions from the community! Whether you are fixing bugs, proposing new features, or improving the documentation, your help is welcome.

Versioning and Changelog

For details on the latest changes and version history, please refer to the full Change Log on GitHub.

License

MolTopolParser is released under the Apache License. See the LICENSE file for more details.


Owner

  • Login: xinmengbcr
  • Kind: user

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 30 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: moltopolparser

A lightweight package to parse and process molecular simulation files

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 30 Last month
Rankings
Dependent packages count: 10.8%
Average: 35.8%
Dependent repos count: 60.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/run_tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
requirements.txt pypi
  • coverage-badge *
  • numpy ==1.26.4
  • pydantic ==2.7.2
  • pytest ==7.2.2
  • pytest-cov ==4.0.0
  • ruff ==v0.0.291
setup.py pypi