Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
3 of 9 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.0%) to scientific vocabulary
Keywords
Repository
Soprano - a Python library to crack crystals!
Basic Info
- Host: GitHub
- Owner: CCP-NC
- License: lgpl-3.0
- Language: Jupyter Notebook
- Default Branch: master
- Homepage: https://ccp-nc.github.io/soprano/
- Size: 25 MB
Statistics
- Stars: 11
- Watchers: 2
- Forks: 13
- Open Issues: 6
- Releases: 2
Topics
Metadata Files
README.md
soprano
Soprano - a Python library to crack crystals!
Introduction
Soprano is a Python library developed and maintained by the CCP for NMR Crystallography as a tool to help scientists working with crystallography and simulations to generate, manipulate, run calculations on and analyse large data sets of crystal structures, with a particular attention to the output of ab-initio random structure searching, or AIRSS. It provides a number of functionalities to help automate many common tasks in computational crystallography.
How to install
Soprano is now available on the Python Package Index. You can install the latest stable release by using pip:
pip install soprano
This will install Soprano with the latest available versions of ASE and NumPy.
Installation Options
Installing with the latest ASE from git (recommended for magres files with CIF-style labels)
ASE versions 3.23 to 3.25 cannot read magres files with CIF-style labels due to a regression. This will be fixed in ASE 3.26 when it is released. Until then, you can install Soprano together with the latest development version of ASE from git:
pip install soprano git+https://gitlab.com/ase/ase.git@master
This will ensure full compatibility with magres files using CIF-style labels.
For Legacy Systems
If you need compatibility with older systems, you can use the legacy installation which pins ASE to version < 3.23 and NumPy to <2.0:
pip install soprano[legacy]
Note: This is useful for environments where you need more controlled dependency versions.
Development Installation
To get the latest development version (not guaranteed to be stable) from GitHub:
git clone https://github.com/CCP-NC/soprano.git
cd soprano
pip install -e .
For development purposes, install additional tools:
pip install -e ".[dev]"
This installs Soprano in development mode, where changes to the code take effect immediately without reinstallation. The dev option includes tools for code formatting, linting, and testing. It also includes the latest development version of ASE from git, which is necessary for reading MAGRES files with CIF-style labels.
You can also combine installation options. For example, to install the development version with the docs dependencies:
pip install -e ".[dev,docs]"
This installs Soprano in development mode with additional dependencies for building documentation.
These approaches should work even on machines without admin privileges (such as HPC clusters), as long as Python and pip are present. You can also use the --user flag with pip to install packages for your user account only.
Requirements
Soprano's dependencies are automatically handled by pip during installation. The core requirements include:
- NumPy
- SciPy
- ASE (Atomic Simulation Environment)
- Pandas (≥2.0)
- Matplotlib
- Spglib (≥2.4)
- Pydantic (≥2.0)
- Click (for CLI functionality)
- Bottleneck (≥1.3.6)
- adjustText
Additional, optional dependencies are available through feature sets:
- docs: Dependencies for building documentation (
jupyter-book,sphinx-click, etc.) - dev: Dependencies for development (
black,flake8,pytest, etc.) - legacy: Pinned versions of ASE and NumPy for compatibility with older systems
Testing
Soprano uses pytest for testing and hatch for environment management. To run the test suite:
```bash
Install hatch first if you don't have it
pip install hatch
Run tests with the default dev environment
hatch run test:test
Run tests with legacy dependencies
hatch run legacy:test
For more verbose output
hatch run test:test -v
To run tests without the latest ASE (if you have issues with it)
hatch run test:test-no-git ```
For contributors running tests locally with GitHub Actions, consider using Act.
Getting started
Soprano ships with several Jupyter notebooks that illustrate its core functionality and how to use it. Being familiar with the use of ase - the Atomic Simulation Environment - is a good starting point. To use Jupyter notebooks you only need to have Jupyter installed, then launch the notebook server in the tutorials folder:
pip install jupyter
cd tutorials
jupyter notebook
Additional information is available in the auto-generated documentation in the docs folder, and the same information can be retrieved by using the Python help function.
Functionality
Here we show a basic rundown - not by any means exhaustive - of Soprano functionality and features.
Mass manipulation of structure datasets with AtomsCollection
The AtomsCollection class generalises ASE's Atoms class by treating groups of structures together and making it easier to retrieve information about all of them at once. Combined with the large number of AtomProperties, which extract chemical and structural information and more, it provides a simple, powerful tool to look quickly at the results of an AIRSS search.
Accurate treatment of periodic boundaries
Many functions in Soprano require to compute interatomic distances, such as when computing bonds, or estimating NMR dipolar couplings. Soprano always takes the utmost care in dealing with periodic boundaries, using algorithms that ensure that the closest periodic copies are always properly accounted for in a fast and efficient way. This approach can also be used in custom functions as the algorithm can be found in the function soprano.utils.minimum_periodic.
Easy processing of NMR parameters and spectral simulations
ASE can read NMR parameters in the .magres file format, but Soprano can turn them to more meaningful physical quantities such as isotropies, anisotropies and asymmetries. In addition, with a full database of NMR active nuclei, Soprano can compute quadrupolar and dipolar couplings for specific isotopes. Finally, Soprano can produce a fast approximation of a powder spectrum - both MAS and static - in the diluted atoms approximation, or if that is not enough for your needs, provide an interface to NMR simulation software Simpson.
Machine learning and phylogenetic analysis
The soprano.analyse.phylogen module contains functionality to classify collections of structures based on relevant parameters of choice and identify similarities and patterns using Scipy's hierarchy and k-means clustering algorithms. This can be of great help when analysing collections of potential crystal structure looking for polymorphs, finding defect sites, or analysing disordered systems.
HPC Submitters
Soprano provides a Submitter class, which can be inherited from by people with some experience in Python coding to create their own scripts running as background processes and able to process large amounts of calculations automatically. Files can be copied, sent to remote HPC machines, submitted for calculations to any of the major queue managing systems, and then downloaded back to the local machine - all or just the significant results, if space is an issue. While not the most user-friendly functionality provided by Soprano, Submitters have the potential to be extremely powerful tools that can save a lot of time when working with large batches of computations.
Owner
- Name: CCP-NC
- Login: CCP-NC
- Kind: organization
- Website: https://www.ccpnc.ac.uk/
- Repositories: 7
- Profile: https://github.com/CCP-NC
The Collaborative Computational Project for NMR Crystallography
GitHub Events
Total
- Issues event: 8
- Watch event: 2
- Issue comment event: 14
- Push event: 9
- Pull request event: 13
- Pull request review event: 5
- Pull request review comment event: 2
- Fork event: 1
Last Year
- Issues event: 8
- Watch event: 2
- Issue comment event: 14
- Push event: 9
- Pull request event: 13
- Pull request review event: 5
- Pull request review comment event: 2
- Fork event: 1
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| ssturniolo | s****o@g****m | 226 |
| Simone Sturniolo | s****o@g****m | 120 |
| Simone Sturniolo | s****o@s****k | 57 |
| Simone | w****5@s****k | 56 |
| Laura | 6****d@u****m | 11 |
| davedavemckay | d****y@u****m | 4 |
| Kane Shenton | j****n@u****m | 2 |
| Kane Shenton | k****n@s****k | 2 |
| Samuel Jackson | s****n@o****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 13
- Total pull requests: 12
- Average time to close issues: about 2 months
- Average time to close pull requests: 2 months
- Total issue authors: 5
- Total pull request authors: 6
- Average comments per issue: 0.92
- Average comments per pull request: 0.33
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- 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: 0
Top Authors
Issue Authors
- jkshenton (6)
- stur86 (6)
- carlosbornes (3)
- dch0ph (1)
- davedavemckay (1)
- samueljackson92 (1)
Pull Request Authors
- jkshenton (10)
- lauramurgatroyd (3)
- carlosbornes (2)
- dch0ph (1)
- davedavemckay (1)
- samueljackson92 (1)
- cotsog (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 486 last-month
-
Total dependent packages: 4
(may contain duplicates) -
Total dependent repositories: 2
(may contain duplicates) - Total versions: 23
- Total maintainers: 2
pypi.org: soprano
A Python library to crack crystals
- Homepage: https://ccp-nc.github.io/soprano/
- Documentation: https://soprano.readthedocs.io/
- License: GNU Library or Lesser General Public License (LGPL)
-
Latest release: 0.10.1
published 7 months ago
Rankings
conda-forge.org: soprano
Soprano is a Python library developed and maintained by the CCP for NMR Crystallography as a tool to help scientists working with crystallography and simulations to generate, manipulate, run calculations on and analyse large data sets of crystal structures, with a particular attention to the output of ab-initio random structure searching, or AIRSS. (https://www.mtg.msm.cam.ac.uk/Codes/AIRSS) It provides a number of functionalities to help automate many common tasks in computational crystallography.
- Homepage: https://ccp-nc.github.io/soprano/
- License: LGPL-3.0-only
-
Latest release: 0.8.13b
published over 4 years ago
Rankings
Dependencies
- ase ==3.16.2
- networkx *
- spglib *
- numpy *