Giter Site home page Giter Site logo

wushanyun64 / soprano Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ccp-nc/soprano

0.0 1.0 0.0 13.51 MB

Soprano - a Python library to crack crystals!

License: Other

Makefile 0.77% Python 57.67% Batchfile 0.72% Shell 0.01% TeX 1.99% Jupyter Notebook 38.84%

soprano's Introduction

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

You can install Soprano simply by cloning this repository and using pip:

git clone https://github.com/CCP-NC/soprano.git
pip install ./soprano --user

This approach should work even on machines on which one does not possess admin privileges (such as HPC clusters), as long as Python and pip are present.

Requirements

Soprano has a few requirements that should be installed automatically by pip when used. Installing with pip is strongly advised. The core Soprano requirements are:

Additional, optional requirements are pyspglib (used for spacegroup detection in soprano.properties.symmetry and soprano.calculate.xrd) and paramiko (used for remote SSH operation in soprano.hpc.submitter).

Getting started

Soprano ships with five Jupyter notebooks that illustrate its core functionality and how to use it. Being accustomed already 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.

soprano's People

Contributors

higgs-bosoff avatar stur86 avatar samueljackson92 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.