Skip to main content

Python Library for Automating Molecular Simulations

Project description

PLAMS - Python Library for Automating Molecular Simulation

Overview

PLAMS is a flexible and extensible toolkit for streamlining molecular simulation workflows.

It simplifies and automates the process of configuring, running and analyzing computational chemistry calculations. The key features of PLAMS are:

  • Amsterdam Modeling Suite (AMS) Integration: Full support for interacting with AMS programs
  • Parallel Processing: Run jobs in parallel without any need for separate parallelization scripts
  • Scheduler Integration: Integration with job schedulers such as SLURM making large-scale computations easier to manage
  • Automatic File and Folder Organization: PLAMS automatically handles file organization, preventing overwrites and ensuring clean data flows
  • Controllable Re-runs and Restarts: Efficiently manage job executions by preventing redundant runs and easily restarting from crash points if needed
  • Output processing: Extract, post-process, and analyze results, ensuring that only relevant data is used for further calculations or workflows
  • Compatibility with Chemistry Tools: Includes built-in interfaces for popular programs and packages such as ASE, RDKit, Dirac, ORCA, CP2K, DFTB+ and Crystal and more

Quick Start

PLAMS is available to all users of AMS "out of the box" as part of the AMS Python Stack, which can be accessed with the $AMSBIN/amspython command.

For most use-cases, no specific installation outside of AMS is required. For usage outside of amspython, please see the installation guide below.

To get started with PLAMS, import scm.plams into your python script or jupyter notebook. Then, follow one of the examples to help create your script e.g.

    # water_opt.py
    from scm.plams import from_smiles, AMSJob
    from scm.input_classes import drivers, engines

    water = from_smiles("O")

    driver = drivers.AMS()
    driver.Task = "GeometryOptimization"
    driver.Properties.NormalModes = "Yes"
    driver.Engine = engines.ForceField()
    driver.Engine.Type = "UFF"

    job = AMSJob(molecule=water, settings=driver, name="water_opt")
    results = job.run()

    print("Optimized geometry:")
    print(results.get_main_molecule())

Running the command $AMSBIN/amspython water_opt.py produces the successful output:

    JOB water_opt RUNNING
    JOB water_opt FINISHED
    JOB water_opt SUCCESSFUL
    Optimized geometry:
      Atoms:
        1         O      -0.000360       0.403461       0.000000
        2         H      -0.783821      -0.202431       0.000000
        3         H       0.784180      -0.201030       0.000000
      Bonds:
       (1)--1.0--(2)
       (1)--1.0--(3)

For more advanced workflows including usage of other AMS engines, see the other examples.

Installation Guide

As mentioned, PLAMS and all its required and optional dependencies are included as part of the AMS python stack. This is the easiest way to use PLAMS, as it requires no additional installation process.

However, if you want to use PLAMS outside of amspython, since AMS2024.103 PLAMS is available on PyPI. and so can be installed via the pip python package installer.

To install the latest version of PLAMS into your python environment, simply run pip install plams. To install a specific version of PLAMS (e.g. 2025.101), run pip install plams==2025.101.

By default, PLAMS only installs a minimal set of required packages on installation using pip. For additional functionality, further optional packages are required. Since AMS2025, these are available for installation through extra dependency groups with pip.

The available groups are:

  • chem: for chemistry packages such as RDKit, ase
  • analysis: for packages used to analyse and plot results of calculations e.g. scipy, matploblib, networkx
  • ams: for technical packages for use with the AMS interface

One or more of these can be installed using the command pip install 'plams[chem,analysis,ams]'.

Users of the AMS will also have to install the scm.amspipe package using the command pip install $AMSHOME/scripting/scm/amspipe.

A final option is to download PLAMS directly from the GitHub page. Released versions are available since AMS2024.103. The latest (unreleased) development version can be downloaded from the trunk branch. Once the downloaded zip file has been extracted, navigate to its location and run pip install . to install into your python environment.

License

See LICENSE.md for details.

Contributing

Contributions are welcome. See CONTRIBUTING.md for details.

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

plams-2025.104.tar.gz (15.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plams-2025.104-py3-none-any.whl (16.1 MB view details)

Uploaded Python 3

File details

Details for the file plams-2025.104.tar.gz.

File metadata

  • Download URL: plams-2025.104.tar.gz
  • Upload date:
  • Size: 15.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for plams-2025.104.tar.gz
Algorithm Hash digest
SHA256 6c338018fcab28cca7bdc78dd4ef0316b1b62997b27fe37a6e784be2ea3cfcdb
MD5 bca76476b35a104e037b5fa7ecf143d7
BLAKE2b-256 654e27a4ea0cad07e090632ba7aac8cacca2cd480b432f66e7f9bb93e94fe147

See more details on using hashes here.

Provenance

The following attestation bundles were made for plams-2025.104.tar.gz:

Publisher: publish.yml on SCM-NV/PLAMS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plams-2025.104-py3-none-any.whl.

File metadata

  • Download URL: plams-2025.104-py3-none-any.whl
  • Upload date:
  • Size: 16.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for plams-2025.104-py3-none-any.whl
Algorithm Hash digest
SHA256 cfc7245e928a56ab0ba91ee6fc3523ecc5bedc12306029bfbcb367b8156af63a
MD5 cbea30cce4905950365c739252204e4d
BLAKE2b-256 9d183a6cf3c6348b334b3e0e5228b8a8b97946b3859f01df7a9fcdc52970f8d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for plams-2025.104-py3-none-any.whl:

Publisher: publish.yml on SCM-NV/PLAMS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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