pmd


Namepmd JSON
Version 1.5.2 PyPI version JSON
download
home_pagehttps://github.com/kevinshen56714/Polymer-Molecular-Dynamics
SummaryAutomated generation of LAMMPS data and input files for polymer molecular dynamics simulations
upload_time2024-02-22 14:15:04
maintainer
docs_urlNone
authorKuan-Hsuan (Kevin) Shen
requires_python>=3.7
licenseMIT
keywords lammps polymer smiles molecular dynamics simulations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://polymer-molecular-dynamics.netlify.app/"><img src="https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/raw/main/website/static/img/logo-with-text.svg" alt="PMD" width="450rem"></a>
</p>
<p align="center">
    <em>Polymer Molecular Dynamics toolkit, easy to learn, fast to code, ready for polymer property production</em>
</p>
<p align="center">
<a href="https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/actions/workflows/main.yml/badge.svg?event=push" target="_blank">
    <img src="https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/actions/workflows/main.yml/badge.svg?event=push" alt="GitHub Workflow">
</a>
<a href="https://coveralls.io/github/kevinshen56714/Polymer-Molecular-Dynamics" target="_blank">
    <img src="https://coveralls.io/repos/github/kevinshen56714/Polymer-Molecular-Dynamics/badge.svg?service=github" alt="Coverage">
</a>
<a href="https://pypi.python.org/pypi/pmd" target="_blank">
    <img src="http://img.shields.io/pypi/v/pmd.svg" alt="Package version">
</a>
<a href="https://pypi.org/project/pmd" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/pmd" alt="Supported Python versions">
</a>
<a href="https://pepy.tech/project/pmd" target="_blank">
    <img src="https://pepy.tech/badge/pmd" alt="Package download">
</a>
</p>

---

**Documentation**: <a href="https://polymer-molecular-dynamics.netlify.app" target="_blank">https://polymer-molecular-dynamics.netlify.app</a>

**Source Code**: <a href="https://github.com/kevinshen56714/Polymer-Molecular-Dynamics" target="_blank">https://github.com/kevinshen56714/Polymer-Molecular-Dynamics</a>

---

PMD is a modern, fast, python framework for building LAMMPS input and data files for predicting polymer properties

The key properties are:

- **Glass transition temperature (Tg)** - [[Guide](http://polymer-molecular-dynamics.netlify.app/docs/guides/glass-transition-temperature)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Tg)]
- **Gas diffusivity** - [[Guide](http://polymer-molecular-dynamics.netlify.app/docs/guides/gas-diffusivity)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Gas_diffusivity)]
- **Solvent diffusivity** - [[Guide](http://polymer-molecular-dynamics.netlify.app/docs/guides/solvent-diffusivity)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Solvent_diffusivity)]
- **Viscosity** - [[Guide](https://polymer-molecular-dynamics.netlify.app/docs/guides/viscosity)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Shear_deformation)]
- **Young's modulus** and **tensile strengths** - [[Guide](https://polymer-molecular-dynamics.netlify.app/docs/guides/mechanical-properties)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Tensile_deformation)]
- **Thermal conductivity** - [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/HeatFluxMeasurement)]

## Installation

```bash
pip install pmd
```

## Example

Below are examples of using PMD to generate LAMMPS data and input files:

### From the command line

```bash
pmd-template
```
https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/assets/11501902/ba892b38-d735-4109-bb66-e4bd7b967245

### From a python script

#### example.py

```python
import pmd

# A list of polymer SMILES strings to create simulations for
smiles_list = ['*CC*', '*CC(*)CC', '*CC(*)CCCC', '*CC(*)c1ccccc1']

for smiles in smiles_list:
    # Define polymer and system specs
    syst = pmd.System(smiles=smiles,
                      density=0.8,
                      natoms_total=5000,
                      natoms_per_chain=150,
                      builder=pmd.EMC(force_field='pcff'))

    # Customize LAMMPS simulation
    lmp = pmd.Lammps(read_data_from=syst,
                     procedures=[
                         pmd.Minimization(min_style='cg'),
                         pmd.Equilibration(Teq=600, Tmax=800),
                         pmd.TgMeasurement(Tinit=600, Tfinal=200)
                     ])

    # Create job scheduler settings
    job = pmd.Torque(run_lammps=lmp,
                     jobname=smiles,
                     project='Your-project-id',
                     nodes=2,
                     ppn=24,
                     walltime='48:00:00')

    # Generate all necessary files at each SMILES folder
    run = pmd.Pmd(system=syst, lammps=lmp, job=job)
    run.create(output_dir=smiles, save_config=True)
```

### From a YAML file

PMD can generate config file in YAML format out of the box, which helps you keep track of all the parameters used for each simulation. At the same time, you can build PMD systems directly via the config file from the command line. For example, run the `pmd-load` command with the following `config.yaml` to get exact same setup as the above example python script (but only for '\*CC\*').

```bash
$ pmd-load config.yaml [-o output_dir]
```

#### config.yaml

```yaml
pmd.System:
  smiles: "*CC*"
  density: 0.8
  builder:
    pmd.EMC:
      force_field: pcff
  natoms_total: 5000
  natoms_per_chain: 150
  data_fname: data.lmps
pmd.Lammps:
  read_data: data.lmps # This file name has to match data_fname if build from a yaml file
  get_functional_form_from: # A PMD Builder has to be provided if build from a yaml file
    pmd.EMC:
      force_field: pcff
  procedures:
    - pmd.Minimization:
        min_style: cg
    - pmd.Equilibration:
        Teq: 600
        Tmax: 800
    - pmd.TgMeasurement:
        Tinit: 600
        Tfinal: 200
  lmp_input_fname: lmp.in
pmd.Torque:
  run_lammps: lmp.in # This file name has to match the above lmp_input_fname if build from a yaml file
  jobname: "*CC*"
  project: Your-project-id
  nodes: 2
  ppn: 24
  walltime: "48:00:00"
  job_fname: job.pbs
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kevinshen56714/Polymer-Molecular-Dynamics",
    "name": "pmd",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "LAMMPS,Polymer,SMILES,Molecular Dynamics,Simulations",
    "author": "Kuan-Hsuan (Kevin) Shen",
    "author_email": "kevinshen56714@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ed/f0/35d6853538f54b4202021bbe740985abbdafbe7a862aa5d16f24c765cbb0/pmd-1.5.2.tar.gz",
    "platform": "any",
    "description": "<p align=\"center\">\n  <a href=\"https://polymer-molecular-dynamics.netlify.app/\"><img src=\"https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/raw/main/website/static/img/logo-with-text.svg\" alt=\"PMD\" width=\"450rem\"></a>\n</p>\n<p align=\"center\">\n    <em>Polymer Molecular Dynamics toolkit, easy to learn, fast to code, ready for polymer property production</em>\n</p>\n<p align=\"center\">\n<a href=\"https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/actions/workflows/main.yml/badge.svg?event=push\" target=\"_blank\">\n    <img src=\"https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/actions/workflows/main.yml/badge.svg?event=push\" alt=\"GitHub Workflow\">\n</a>\n<a href=\"https://coveralls.io/github/kevinshen56714/Polymer-Molecular-Dynamics\" target=\"_blank\">\n    <img src=\"https://coveralls.io/repos/github/kevinshen56714/Polymer-Molecular-Dynamics/badge.svg?service=github\" alt=\"Coverage\">\n</a>\n<a href=\"https://pypi.python.org/pypi/pmd\" target=\"_blank\">\n    <img src=\"http://img.shields.io/pypi/v/pmd.svg\" alt=\"Package version\">\n</a>\n<a href=\"https://pypi.org/project/pmd\" target=\"_blank\">\n    <img src=\"https://img.shields.io/pypi/pyversions/pmd\" alt=\"Supported Python versions\">\n</a>\n<a href=\"https://pepy.tech/project/pmd\" target=\"_blank\">\n    <img src=\"https://pepy.tech/badge/pmd\" alt=\"Package download\">\n</a>\n</p>\n\n---\n\n**Documentation**: <a href=\"https://polymer-molecular-dynamics.netlify.app\" target=\"_blank\">https://polymer-molecular-dynamics.netlify.app</a>\n\n**Source Code**: <a href=\"https://github.com/kevinshen56714/Polymer-Molecular-Dynamics\" target=\"_blank\">https://github.com/kevinshen56714/Polymer-Molecular-Dynamics</a>\n\n---\n\nPMD is a modern, fast, python framework for building LAMMPS input and data files for predicting polymer properties\n\nThe key properties are:\n\n- **Glass transition temperature (Tg)** - [[Guide](http://polymer-molecular-dynamics.netlify.app/docs/guides/glass-transition-temperature)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Tg)]\n- **Gas diffusivity** - [[Guide](http://polymer-molecular-dynamics.netlify.app/docs/guides/gas-diffusivity)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Gas_diffusivity)]\n- **Solvent diffusivity** - [[Guide](http://polymer-molecular-dynamics.netlify.app/docs/guides/solvent-diffusivity)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Solvent_diffusivity)]\n- **Viscosity** - [[Guide](https://polymer-molecular-dynamics.netlify.app/docs/guides/viscosity)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Shear_deformation)]\n- **Young's modulus** and **tensile strengths** - [[Guide](https://polymer-molecular-dynamics.netlify.app/docs/guides/mechanical-properties)] [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/Tensile_deformation)]\n- **Thermal conductivity** - [[Scripts](https://github.com/kevinshen56714/Polymer-Molecular-Dynamics/tree/main/scripts/HeatFluxMeasurement)]\n\n## Installation\n\n```bash\npip install pmd\n```\n\n## Example\n\nBelow are examples of using PMD to generate LAMMPS data and input files:\n\n### From the command line\n\n```bash\npmd-template\n```\nhttps://github.com/kevinshen56714/Polymer-Molecular-Dynamics/assets/11501902/ba892b38-d735-4109-bb66-e4bd7b967245\n\n### From a python script\n\n#### example.py\n\n```python\nimport pmd\n\n# A list of polymer SMILES strings to create simulations for\nsmiles_list = ['*CC*', '*CC(*)CC', '*CC(*)CCCC', '*CC(*)c1ccccc1']\n\nfor smiles in smiles_list:\n    # Define polymer and system specs\n    syst = pmd.System(smiles=smiles,\n                      density=0.8,\n                      natoms_total=5000,\n                      natoms_per_chain=150,\n                      builder=pmd.EMC(force_field='pcff'))\n\n    # Customize LAMMPS simulation\n    lmp = pmd.Lammps(read_data_from=syst,\n                     procedures=[\n                         pmd.Minimization(min_style='cg'),\n                         pmd.Equilibration(Teq=600, Tmax=800),\n                         pmd.TgMeasurement(Tinit=600, Tfinal=200)\n                     ])\n\n    # Create job scheduler settings\n    job = pmd.Torque(run_lammps=lmp,\n                     jobname=smiles,\n                     project='Your-project-id',\n                     nodes=2,\n                     ppn=24,\n                     walltime='48:00:00')\n\n    # Generate all necessary files at each SMILES folder\n    run = pmd.Pmd(system=syst, lammps=lmp, job=job)\n    run.create(output_dir=smiles, save_config=True)\n```\n\n### From a YAML file\n\nPMD can generate config file in YAML format out of the box, which helps you keep track of all the parameters used for each simulation. At the same time, you can build PMD systems directly via the config file from the command line. For example, run the `pmd-load` command with the following `config.yaml` to get exact same setup as the above example python script (but only for '\\*CC\\*').\n\n```bash\n$ pmd-load config.yaml [-o output_dir]\n```\n\n#### config.yaml\n\n```yaml\npmd.System:\n  smiles: \"*CC*\"\n  density: 0.8\n  builder:\n    pmd.EMC:\n      force_field: pcff\n  natoms_total: 5000\n  natoms_per_chain: 150\n  data_fname: data.lmps\npmd.Lammps:\n  read_data: data.lmps # This file name has to match data_fname if build from a yaml file\n  get_functional_form_from: # A PMD Builder has to be provided if build from a yaml file\n    pmd.EMC:\n      force_field: pcff\n  procedures:\n    - pmd.Minimization:\n        min_style: cg\n    - pmd.Equilibration:\n        Teq: 600\n        Tmax: 800\n    - pmd.TgMeasurement:\n        Tinit: 600\n        Tfinal: 200\n  lmp_input_fname: lmp.in\npmd.Torque:\n  run_lammps: lmp.in # This file name has to match the above lmp_input_fname if build from a yaml file\n  jobname: \"*CC*\"\n  project: Your-project-id\n  nodes: 2\n  ppn: 24\n  walltime: \"48:00:00\"\n  job_fname: job.pbs\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Automated generation of LAMMPS data and input files for polymer molecular dynamics simulations",
    "version": "1.5.2",
    "project_urls": {
        "Documentation": "https://polymer-molecular-dynamics.netlify.app/",
        "Homepage": "https://github.com/kevinshen56714/Polymer-Molecular-Dynamics",
        "Source": "https://github.com/kevinshen56714/Polymer-Molecular-Dynamics"
    },
    "split_keywords": [
        "lammps",
        "polymer",
        "smiles",
        "molecular dynamics",
        "simulations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b14c64fcc9ab45ae0ef9360da82d18c1481a4a20b612968d3c918846d19a1c24",
                "md5": "be397eb0d2ec05cf153147f4441a87fc",
                "sha256": "38b254319c693a5588d49df9d79f60383bb5b9c34fedf387c4907310a3536e1f"
            },
            "downloads": -1,
            "filename": "pmd-1.5.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "be397eb0d2ec05cf153147f4441a87fc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 83080,
            "upload_time": "2024-02-22T14:15:00",
            "upload_time_iso_8601": "2024-02-22T14:15:00.999871Z",
            "url": "https://files.pythonhosted.org/packages/b1/4c/64fcc9ab45ae0ef9360da82d18c1481a4a20b612968d3c918846d19a1c24/pmd-1.5.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "edf035d6853538f54b4202021bbe740985abbdafbe7a862aa5d16f24c765cbb0",
                "md5": "17f802d0bfcb6d4c8aaf5e05332ba34b",
                "sha256": "232ee15aae32bc1b8f10761df70cf522434033f0a7c54029cfdb691c6221f854"
            },
            "downloads": -1,
            "filename": "pmd-1.5.2.tar.gz",
            "has_sig": false,
            "md5_digest": "17f802d0bfcb6d4c8aaf5e05332ba34b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4517023,
            "upload_time": "2024-02-22T14:15:04",
            "upload_time_iso_8601": "2024-02-22T14:15:04.110013Z",
            "url": "https://files.pythonhosted.org/packages/ed/f0/35d6853538f54b4202021bbe740985abbdafbe7a862aa5d16f24c765cbb0/pmd-1.5.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-22 14:15:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kevinshen56714",
    "github_project": "Polymer-Molecular-Dynamics",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pmd"
}
        
Elapsed time: 1.23572s