{"id":22757437,"url":"https://github.com/peterspackman/chmpy","last_synced_at":"2025-09-12T02:19:04.732Z","repository":{"id":39118427,"uuid":"211644812","full_name":"peterspackman/chmpy","owner":"peterspackman","description":"Spherical harmonic shape descriptors, promolecule densities, isosurfaces and Hirshfeld surfaces in python","archived":false,"fork":false,"pushed_at":"2024-11-22T03:28:39.000Z","size":27346,"stargazers_count":19,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-11T07:18:21.727Z","etag":null,"topics":["crystallography","descriptor","descriptor-learning","electron-density","hirshfeld-surface","isosurface","machine-learning-library","promolecule"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterspackman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-29T10:20:06.000Z","updated_at":"2024-11-22T03:27:00.000Z","dependencies_parsed_at":"2024-05-01T02:36:24.762Z","dependency_job_id":"75d5d0c3-ff54-411e-9a67-a925a883ab9a","html_url":"https://github.com/peterspackman/chmpy","commit_stats":{"total_commits":282,"total_committers":2,"mean_commits":141.0,"dds":"0.0035460992907800915","last_synced_commit":"7def636618e0364cbf8e886c8e1e541a3356c168"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Fchmpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Fchmpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Fchmpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Fchmpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterspackman","download_url":"https://codeload.github.com/peterspackman/chmpy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445926,"owners_count":18227060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crystallography","descriptor","descriptor-learning","electron-density","hirshfeld-surface","isosurface","machine-learning-library","promolecule"],"created_at":"2024-12-11T07:18:23.348Z","updated_at":"2024-12-19T14:06:52.227Z","avatar_url":"https://github.com/peterspackman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI](https://github.com/peterspackman/chmpy/workflows/CI/badge.svg)\n[![DOI](https://zenodo.org/badge/211644812.svg)](https://zenodo.org/doi/10.5281/zenodo.10697512)\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/peterspackman/chmpy\"\u003e\n    \u003cimg src=\"docs/assets/chmpy_logo.png\" alt=\"chmpy logo\" height=\"128\" width=\"128\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003echmpy\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A library for computational chemistry in python.\n    \u003cbr /\u003e\n    \u003ca href=\"https://peterspackman.github.io/chmpy\"\u003e\u003cstrong\u003eDocumentation»\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/peterspackman/chmpy/issues\"\u003eReport a bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/peterspackman/chmpy/issues\"\u003eRequest a new feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\nchmpy supports handling molecules, crystals, Hirshfeld \u0026 promolecule \ndensity isosurfaces, spherical harmonic shape descriptors and much more...\n\n# Installation\n\nBasic installation can be done through the python package manager `pip`:\n\n``` bash\npip install chmpy\n# or to install directly from GitHub:\npip install git+https://github.com/peterspackman/chmpy.git\n```\n\nFor development or modifications, install locally using pip:\n\n``` bash\npip install -e .\n```\n\n# Features\nWhile the library is intended to be flexible and make it easy to build\ncomplex pipelines or properties, the following is a brief summary of\nintended features:\n\n- Load crystal structures from `.cif`, `.res`, `POSCAR` files.\n- Evaluate promolecule and procrystal electron densities.\n- Easily generate Hirshfeld or promolecule isosurfaces and associated properties.\n- Easily generate spherical harmonic shape descriptors for atoms, molecules, or molecular fragments.\n- Efficiently calculate crystal slabs, periodic connectivity and more...\n- Automatic parallelization of some calculations using OpenMP (set the `OMP_NUM_THREADS` environment variable)\n\nIt should also serve as a simple, easy to read library for learning\nhow to represent crystal structures, molecules etc. and evaluate\nscientifically relevant information quickly and efficiently using\npython.\n\n# Examples\n\n## Crystal structures and molecules\n\nLoading a crystal structure from a CIF (`.cif`) or SHELX (`.res`)\nfile, or a molecule from an XMOL (`.xyz`) file is straightforward:\n\n``` python\nfrom chmpy import Crystal, Molecule\nc = Crystal.load(\"tests/acetic_acid.cif\")\nprint(c)\n# \u003cCrystal C2H4O2 Pna2_1\u003e\n# Calculate the unique molecules in this crystal\nc.symmetry_unique_molecules()\n# [\u003cMolecule: C2H4O2(2.12,1.15,0.97)\u003e]\nm = Molecule.load(\"tests/water.xyz\")\nprint(m)\n# \u003cMolecule: H2O(-0.67,-0.00,0.01)\u003e\n```\n\n## Hirshfeld and promolecule density isosurfaces\n\nHirshfeld and promolecule density isosurfaces\n\nGeneration of surfaces with the default settings can be done with\nminimal hassle, simply by using the corresponding members of the Crystal\nclass:\n\n``` python\nc = Crystal.load(\"tests/test_files/acetic_acid.cif\")\n# This will generate a high resolution surface\n# for each symmetry unique molecule in the crystal\nsurfaces = c.hirshfeld_surfaces()\nprint(surfaces)\n# [\u003ctrimesh.Trimesh(vertices.shape=(3598, 3), faces.shape=(7192, 3))\u003e]\n# We can generate lower resolution surfaces with the separation parameter\nsurfaces = c.hirshfeld_surfaces(separation=0.5)\nprint(surfaces)\n# [\u003ctrimesh.Trimesh(vertices.shape=(584, 3), faces.shape=(1164, 3))\u003e]\n# Surfaces can be saved via trimesh, or a utility function provided in chmpy\nfrom chmpy.util.mesh import save_mesh\nsave_mesh(surfaces[0], \"acetic_acid.ply\")\n```\n    \nThe resulting surface should look something like this when visualized:\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"src/chmpy/tests/acetic_acid.png\" alt=\"Acetic acid\" height=200\u003e\n\u003c/div\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterspackman%2Fchmpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterspackman%2Fchmpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterspackman%2Fchmpy/lists"}