GithubHelp home page GithubHelp logo

bjmorgan / kinisi Goto Github PK

View Code? Open in Web Editor NEW
44.0 6.0 10.0 129.23 MB

A Python package for estimating diffusion properties from molecular dynamics simulations.

Home Page: https://kinisi.readthedocs.io

License: MIT License

Python 96.39% TeX 3.61%
python molecular-dynamics diffusion

kinisi's Introduction

The kinisi logo

Pronunciation: kee-nee-see

JOSS Status Test Coverage Documentation Status PyPI version

kinisi is an open-source package focussed on accurately quantifying the uncertainty in atomic and molecular displacements, and using this to more completely understand diffusion in materials.

Installation

kinisi is available from the PyPI repository so can be installed using pip or alternatively clone this repository and install the latest development build with the commands below.

pip install .

Contributing

If you would like to contribute to kinisi, have a look at the CONTRIBUTING.md that outlines the different ways to help out.

kinisi's People

Contributors

alexsquires avatar arm61 avatar bjmorgan avatar jd15489 avatar zhubonan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kinisi's Issues

Documentation rendering badly

I think there has been an update to the theme that we use cause the docs are looking bad now (see double figure on the homepage).

Subtract drift/center of mass during MSD calculation

Hello,

What do you think, is subtracting the drift of the entire system a necessary feature when calculating MSD? Seems to be an important step for the non-periodic systems, but not sure about 3D periodicity. It was somehow implemented in pymatgen's analyzer (using center of the geometry of a non-mobile framework ions) and maybe you can add similar feature in your package

Error bars in the docs

It would be nice to update the pymatgen docs page so that the “error bars” plot notes the distinction between the expected variance in the observed MSD and the posterior predictive MSD distribution.

Remove memory limit limitation by refactoring

By calculating the mean-squared displacement and variance when the displacements are found instead of storing this data will remove the memory limitation. However, this requires careful thought such that the bootstrapping can still be performed if desired.

Diffusion coefficient Units

Hello,

Please let me confirm, that the units for diffusion coefficient are cm^2/s if we extract the data from XDATCAR from VASP MD simulations.
If I compare the diffusion coefficient with VASPKIT data (which generates in terms of cm^2/s), then it seems that kinsi produces D in units of m^2/s or vice versa. Below, I provide the value of D from VASPKIT and KINSI at similar temperature:
VASPKIT: 0.1012E-04
KINSI: 9.795032526434394e-09

Thankyou!

Add instruction for building the documentation

Please add instructions showing how to build the documentation. It looks like the Makefile under the doc is not working properly.

make html
Running Sphinx v7.2.6

Extension error:
Could not import extension sphinx_autodoc_typehints (exception: No module named 'sphinx_autodoc_typehints')
make: *** [Makefile:19: html] Error 2

Reproducibility of jupyter notebook example

I just run the Notebook examples, and I found the number I got is slightly different compared to the number shown on documentation webpage. I assume this is normal right? If so, please indicate there will be some differences when rerun the notebook examples.

One of the example is on https://kinisi.readthedocs.io/en/latest/vasp_dj.html

diff.D_J.n, diff.D_J.con_int()

I got

(1.423210688465144e-05, array([1.60546798e-06, 2.96878163e-05]))

on the webpage the results are:

(1.4064382415055966e-05, array([1.54355335e-06, 2.96839782e-05]))

Use of max(NGP) in docs can encourage poor practice.

The docs talk about using the maximum in the non-Gaussian parameter as an indicator of "the start of the diffusive regime". e.g., https://kinisi.readthedocs.io/en/latest/vasp_dj.html.
This is not necessarily the case, and can encourage users to blindly use the max(NGP) as the start of their fitting regime, withouth looking at their data.
I suggest we revise the docs so that we do not imply that max(NGP) can always be used as a sensible fitting start-point.

Support a list of `Xdatcar` objects

Currently a list of strings pointing to files that can be read by pymatgen.Xdatcar can be parsed with the dtype='IdenticalXdatcar flag. However, it would be nicer to allow the user to pre-read the files.

No support for NPT simulations

Currently, kinisi only supports NVT simulations (because in the parser just the first lattice parameters are used). It should be a pretty straightforward fix.

Include the ability to calculate a centre of geometry mean-squared displacement

Currently, if you want to calculate the MSD for a molecule, there is a lot of gymnastics involving MDAnalysis to get here. This could be greatly simplified for the user by allowing a centre of geometry/mass calculation within kinisi (before the displacements are determined.

I think this would look best as something like

specie=[('C', 'O1', 'O2')]

For a CO2 molecule, i.e., the tuple defines the molecule that the centre of geometry/mass should be found over.

This should probably wait for the conclusion of #30 as it should also work for indices.

misleading doc string

    def save(self, filename: str):
        """
        Save the Analyzer object as a HDF5 file.

        :param filename: Name for the file, no file extension is required and if one if given it is replaced with .hdf.
        """

This doc strings is explicit in saying no extension is required, but if .hdf is not given, it errors out. I considered pushing a fix but then was not sure what the intended behaviour is.

suggestion for CONTRIBUTING.md

Here:

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

    $ mkvirtualenv kinisi
    $ cd kinisi/
    $ python setup.py develop

I couldn't find the setup.py (is it because I use conda instead of mkvirtualenv?), I guess it shall be installed in this way

pip install .[dev]

Implementation of ase's parser (instead of pymatgen's one)

Hello,

I highly recommend switching to ase.io.read method for reading trajectories instead of pymatgen's Xdatcar. It is an order of magnitude faster for relatively long trajectories (~100,000 ionic steps) in comparison to pymatgen.

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.