openmol


Nameopenmol JSON
Version 1.2.2 PyPI version JSON
download
home_page
SummaryConvert between popular molecular dynamics data file formats.
upload_time2024-02-25 05:56:04
maintainer
docs_urlNone
author
requires_python>=3.0
license
keywords research simulation development
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OpenMOL
OpenMOL is a Python package to convert between popular molecular dynamics data file formats. It exposes a pythonic way to easily manipulate MOL2 and LAMMPS data files.

## Features
- Convert AMBER PARM7 and restart files into LAMMPS data files.
- Read, manipulate and write MOL2 files.
- Save data files into portable openmol json format without losing any properties.
- Build complex mol2 systems using Discovery Studio and import into *tleap*.
- Extensible.

## Installation
You can install `openmol` directly from [PyPI](https://pypi.org/project/openmol) using `pip`.

```sh
pip install openmol
```

## Usage Examples

### AMBER to LAMMPS
Convert AMBER **prmtop** and **restart** files to a LAMMPS **data** file.
```python
from openmol import amber_parm7 as amber
from openmol import lammps_full as lammps

# read amber parm files
p = amber.read('system.prmtop', 'system.rst7')

# calculate necessary lammps items and write
p = lammps.build(p)
lmp = lammps.Writer(p, 'system.data')
lmp.write()
```

### Fix VMD MOL2
The *SUBSTRUCTURE* section of the MOL2 files created by VMD are not always properly formated. Use the following to fix the format.

```python
from openmol import tripos_mol2 as mol2

# read vmd output mol2 file
p = mol2.read('vmd_saved.mol2')

# calculate necessary mol2 residue info
p = mol2.build(p)

# write the fixed mol2 file
mol2.Writer(p, 'fixed_vmd_saved.mol2').write()
```

### Fix DSV mol2 residue names
Discovery Studio Visualizer generated MOL2 files can contain digits as suffixes in the residue names. Update the residue names for all atoms as below.

```python
from openmol import tripos_mol2 as mol2

p = mol2.read('dsv_output.mol2')

# set all atom's resname to FeO
for i, atom in enumerate(p.atom_name):
	p.atom_resname[i] = 'FeO'

p = mol2.build(p)

# write the fixed mol2 file
mol2.Writer(p, 'fixed_dsv_output.mol2').write()
```

## Current Implementations

Parser | Reader | Writer
-------|--------|-------
Amber  |  Yes   |  x
LAMMPS |   x    | Yes
MOL2   |  Yes   | Yes

*Contributions welcome!*

For the latest development version you can clone the [Git repository](https://github.com/akhlakm/OpenMOL).

```sh
git clone https://github.com/akhlakm/OpenMOL
cd OpenMOL
pip install -e .
```

## License
GNU General Public License v3.0 (GPLv3.0)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "openmol",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": "",
    "keywords": "research,simulation,development",
    "author": "",
    "author_email": "Akhlak Mahmood <akhlakm@gatech.edu>",
    "download_url": "https://files.pythonhosted.org/packages/60/2b/7ef262e0c4bd7daec7dc859dda80d5cbba683c06dd50b627a8e436934155/openmol-1.2.2.tar.gz",
    "platform": null,
    "description": "\ufeff# OpenMOL\nOpenMOL is a Python package to convert between popular molecular dynamics data file formats. It exposes a pythonic way to easily manipulate MOL2 and LAMMPS data files.\n\n## Features\n- Convert AMBER PARM7 and restart files into LAMMPS data files.\n- Read, manipulate and write MOL2 files.\n- Save data files into portable openmol json format without losing any properties.\n- Build complex mol2 systems using Discovery Studio and import into *tleap*.\n- Extensible.\n\n## Installation\nYou can install `openmol` directly from [PyPI](https://pypi.org/project/openmol) using `pip`.\n\n```sh\npip install openmol\n```\n\n## Usage Examples\n\n### AMBER to LAMMPS\nConvert AMBER **prmtop** and **restart** files to a LAMMPS **data** file.\n```python\nfrom openmol import amber_parm7 as amber\nfrom openmol import lammps_full as lammps\n\n# read amber parm files\np = amber.read('system.prmtop', 'system.rst7')\n\n# calculate necessary lammps items and write\np = lammps.build(p)\nlmp = lammps.Writer(p, 'system.data')\nlmp.write()\n```\n\n### Fix VMD MOL2\nThe *SUBSTRUCTURE* section of the MOL2 files created by VMD are not always properly formated. Use the following to fix the format.\n\n```python\nfrom openmol import tripos_mol2 as mol2\n\n# read vmd output mol2 file\np = mol2.read('vmd_saved.mol2')\n\n# calculate necessary mol2 residue info\np = mol2.build(p)\n\n# write the fixed mol2 file\nmol2.Writer(p, 'fixed_vmd_saved.mol2').write()\n```\n\n### Fix DSV mol2 residue names\nDiscovery Studio Visualizer generated MOL2 files can contain digits as suffixes in the residue names. Update the residue names for all atoms as below.\n\n```python\nfrom openmol import tripos_mol2 as mol2\n\np = mol2.read('dsv_output.mol2')\n\n# set all atom's resname to FeO\nfor i, atom in enumerate(p.atom_name):\n\tp.atom_resname[i] = 'FeO'\n\np = mol2.build(p)\n\n# write the fixed mol2 file\nmol2.Writer(p, 'fixed_dsv_output.mol2').write()\n```\n\n## Current Implementations\n\nParser | Reader | Writer\n-------|--------|-------\nAmber  |  Yes   |  x\nLAMMPS |   x    | Yes\nMOL2   |  Yes   | Yes\n\n*Contributions welcome!*\n\nFor the latest development version you can clone the [Git repository](https://github.com/akhlakm/OpenMOL).\n\n```sh\ngit clone https://github.com/akhlakm/OpenMOL\ncd OpenMOL\npip install -e .\n```\n\n## License\nGNU General Public License v3.0 (GPLv3.0)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Convert between popular molecular dynamics data file formats.",
    "version": "1.2.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/akhlakm/OpenMOL/issues",
        "Homepage": "https://github.com/akhlakm/OpenMOL"
    },
    "split_keywords": [
        "research",
        "simulation",
        "development"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c173401b92dd017926cac6192be6dfb6a93035a3b63a4d165fea4fbf49a42b40",
                "md5": "2c4aa625ededc0bb6208a4f9d956ed75",
                "sha256": "5e64693b80493103b841194da37816b10d5fc9e094958e5f5843dc3a0080c26e"
            },
            "downloads": -1,
            "filename": "openmol-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2c4aa625ededc0bb6208a4f9d956ed75",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 37591,
            "upload_time": "2024-02-25T05:56:02",
            "upload_time_iso_8601": "2024-02-25T05:56:02.761497Z",
            "url": "https://files.pythonhosted.org/packages/c1/73/401b92dd017926cac6192be6dfb6a93035a3b63a4d165fea4fbf49a42b40/openmol-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "602b7ef262e0c4bd7daec7dc859dda80d5cbba683c06dd50b627a8e436934155",
                "md5": "d2c8919c986bc70b04b306ca89710547",
                "sha256": "928fb92b85b68a0eb8c9383e10b14f66f1cd76fa795db83cbc0a3ec2e0609726"
            },
            "downloads": -1,
            "filename": "openmol-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d2c8919c986bc70b04b306ca89710547",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 34011,
            "upload_time": "2024-02-25T05:56:04",
            "upload_time_iso_8601": "2024-02-25T05:56:04.484535Z",
            "url": "https://files.pythonhosted.org/packages/60/2b/7ef262e0c4bd7daec7dc859dda80d5cbba683c06dd50b627a8e436934155/openmol-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-25 05:56:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "akhlakm",
    "github_project": "OpenMOL",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "openmol"
}
        
Elapsed time: 3.75676s