chmpy

Spherical harmonic shape descriptors, promolecule densities, isosurfaces and Hirshfeld surfaces in python

https://github.com/peterspackman/chmpy

Science Score: 67.0%

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

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary

Keywords

crystallography descriptor descriptor-learning electron-density hirshfeld-surface isosurface machine-learning-library promolecule
Last synced: 6 months ago · JSON representation ·

Repository

Spherical harmonic shape descriptors, promolecule densities, isosurfaces and Hirshfeld surfaces in python

Basic Info
  • Host: GitHub
  • Owner: peterspackman
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 26.6 MB
Statistics
  • Stars: 24
  • Watchers: 3
  • Forks: 3
  • Open Issues: 2
  • Releases: 11
Topics
crystallography descriptor descriptor-learning electron-density hirshfeld-surface isosurface machine-learning-library promolecule
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

CI DOI


chmpy logo

chmpy

A library for computational chemistry in python.
Documentation
Report a bug

<a href="https://github.com/peterspackman/chmpy/issues">Request a new feature</a>

chmpy supports handling molecules, crystals, Hirshfeld & promolecule density isosurfaces, spherical harmonic shape descriptors and much more...

Installation

Basic installation can be done through the python package manager pip:

``` bash pip install chmpy

or to install directly from GitHub:

pip install git+https://github.com/peterspackman/chmpy.git ```

For development or modifications, install locally using pip:

bash pip install -e .

Features

While the library is intended to be flexible and make it easy to build complex pipelines or properties, the following is a brief summary of intended features:

  • Load crystal structures from .cif, .res, POSCAR files.
  • Evaluate promolecule and procrystal electron densities.
  • Easily generate Hirshfeld or promolecule isosurfaces and associated properties.
  • Easily generate spherical harmonic shape descriptors for atoms, molecules, or molecular fragments.
  • Efficiently calculate crystal slabs, periodic connectivity and more...
  • Automatic parallelization of some calculations using OpenMP (set the OMP_NUM_THREADS environment variable)

It should also serve as a simple, easy to read library for learning how to represent crystal structures, molecules etc. and evaluate scientifically relevant information quickly and efficiently using python.

Examples

Crystal structures and molecules

Loading a crystal structure from a CIF (.cif) or SHELX (.res) file, or a molecule from an XMOL (.xyz) file is straightforward:

``` python from chmpy import Crystal, Molecule c = Crystal.load("tests/acetic_acid.cif") print(c)

Calculate the unique molecules in this crystal

c.symmetryuniquemolecules()

[]

m = Molecule.load("tests/water.xyz") print(m)

```

Hirshfeld and promolecule density isosurfaces

Hirshfeld and promolecule density isosurfaces

Generation of surfaces with the default settings can be done with minimal hassle, simply by using the corresponding members of the Crystal class:

``` python c = Crystal.load("tests/testfiles/aceticacid.cif")

This will generate a high resolution surface

for each symmetry unique molecule in the crystal

surfaces = c.hirshfeld_surfaces() print(surfaces)

[]

We can generate lower resolution surfaces with the separation parameter

surfaces = c.hirshfeld_surfaces(separation=0.5) print(surfaces)

[]

Surfaces can be saved via trimesh, or a utility function provided in chmpy

from chmpy.util.mesh import savemesh savemesh(surfaces[0], "acetic_acid.ply") ```

The resulting surface should look something like this when visualized:


Acetic acid

Owner

  • Name: Peter Spackman
  • Login: peterspackman
  • Kind: user
  • Location: Perth, Western Australia
  • Company: Curtin University

Research Fellow in the Computational Materials and Minerals group @ Curtin University

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Spackman
  given-names: "Peter R."
  orcid: "https://orcid.org/0000-0002-6532-8571"
title: "Chmpy: A python library for computational chemistry"
version: v1.1.5
date-released: 2024-02-24

GitHub Events

Total
  • Release event: 2
  • Watch event: 5
  • Push event: 25
  • Create event: 2
Last Year
  • Release event: 2
  • Watch event: 5
  • Push event: 25
  • Create event: 2

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 282
  • Total Committers: 2
  • Avg Commits per committer: 141.0
  • Development Distribution Score (DDS): 0.004
Top Committers
Name Email Commits
Peter Spackman p****n@f****m 281
Sebastian Hutsch s****h@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 4
  • Total pull requests: 2
  • Average time to close issues: 5 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 3.25
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 4 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • qzhu2017 (2)
  • peterspackman (1)
  • satish-oo1 (1)
Pull Request Authors
  • dependabot[bot] (2)
  • Setchatuan (1)
Top Labels
Issue Labels
documentation (1) question (1) enhancement (1)
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,477 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
  • Total maintainers: 1
pypi.org: chmpy

Molecules, crystals, promolecule and Hirshfeld surfaces using python.

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,477 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 17.2%
Average: 19.5%
Downloads: 20.0%
Forks count: 23.2%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

pyproject.toml pypi
  • Cython ^0.29.30 develop
  • flake8 ^4.0.1 develop
  • pytest ^7.1.2 develop
  • Jinja2 ^3.1.2
  • furo >=2022.6.21
  • matplotlib ^3.5.2
  • myst-parser >=0.18.0
  • numpy ^1.12
  • python >=3.8,<3.11
  • scipy ^1.8.1
  • seaborn ^0.11.2
  • sphinx >=5.1.0
  • trimesh ^3.12.9
.github/workflows/pythonpackage.yml actions
  • actions/cache v1 composite
  • actions/checkout v1 composite
  • actions/setup-python v1 composite
setup.py pypi
.github/workflows/docs.yml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite