Giter Site home page Giter Site logo

aiida-vasp / aiida-vasp Goto Github PK

View Code? Open in Web Editor NEW
44.0 9.0 42.0 22.1 MB

A plugin to AiiDA for running simulations with VASP

Home Page: https://aiida-vasp.readthedocs.org/en/latest

License: Other

Python 86.27% Shell 0.26% Propeller Spin 13.47%
aiida aiida-vasp vasp materials-science ab-initio

aiida-vasp's Introduction

AiiDA VASP plugin

Release Stable version PyPI - Status Supported Python versions
Build Build status Test coverage Documentation Status
Stats PyPI - Downloads/month GitHub commit activity

This is a plugin to AiiDA to run calculations with the ab-initio program VASP.

Please have a look at the AiiDA-VASP documentation for instructions on how to install and use the plugin.

Installing the plugin

  1. If you are already using AiiDA, simply activate the virtual environment associated with it, here assumed to be located in ~/env/aiida-vasp:

    $ source ~/env/aiida-vasp/bin/activate
  2. Otherwise, set up a new virtual environment:

    $ python -m venv ~/env/aiida-vasp
  3. And then enable the newly installed virtual environment:

    $ source ~/env/aiida-vasp/bin/activate
  4. Install the AiiDA-VASP plugin (and AiiDA if that is not already installed):

    $ (aiida-vasp) pip install aiida-vasp

If you need to install the compatibility release of AiiDA-VASP which works with AiiDA 1.6.4 you should instead install the plugin using pip install aiida-vasp=2.2, but this is not recommended and only mentioned for legacy support. For the legacy version you also most likely have to run reentry scan -r aiida after installing the plugin.

This will automatically install the AiiDA python package(s) as well as any other dependencies of the plugin and register all the plugin classes with AiiDA.

Please consider that AiiDA have prerequisite that needs to be installed and ensured working. The steps above will not take care of this for you. Please consult AiiDA prerequisites and follow the instructions therein.

Support

The development, maintenance and use of this plugin is considered a community effort. In order to facilitate for the community to contribute, we have established a space on Matrix that users can use to communicate. We encourage users to help each other. In addition, the development team is present in the space and users are free to ask. First consult the documentation of both AiiDA-VASP documentation and AiiDA documentation and also consider that the developers are not paid for this work. Please respect potential lead times in getting answers and be polite.

aiida-vasp's People

Contributors

atztogo avatar danielmarchand avatar dependabot[bot] avatar dropd avatar espenfl avatar greschd avatar jpchico avatar kavanase avatar lan496 avatar mcallsen avatar michaelwolloch avatar muhrin avatar sphuber avatar unkcpz avatar vladislavnikolaevmipt 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  avatar  avatar  avatar

aiida-vasp's Issues

POSCAR generated incorrectly in fix-50

In fix-50 branch the POSCAR file is not generated correctly.
I experienced the issue running the simple Si example in examples directory:

ERROR: the triple product of the basis vectors is negative exchange two basis vectors

It works Ok in development branch.

INCAR parsing: num * num is not parsed

lines like

MAGMOM = 0. * 600

are parsed into {'magmom': 0}.

Continuing the effort to make vasp parameter input nodes queryable, this should be parsed into a python value. However, actually converting it to [0.] * 6 is very space inefficient and may slow down querying.

A first approach should be to parse into something like

{'list': [0.], 'repetitions': 600}

And then adjust io.incar._incarify to parse dictionaries as repeated arrays back into '0. * 600' form.

Redesign Potcar data nodes

Problem with current system

Currently licenced information is stored in PawData nodes which are also used as input nodes to VaspCalculations. This leads to a proveniency graph link from licenced data to every calculation. This in turn makes it illegal to share exported aiida-vasp calculations with non-license holders.

Tentative solution:

Split into two data classes. One holds the file and hash, one serves as a facade and only holds the hash. For both the hash must be unique, so that without having a link in the proveniency graph, we can find one from the other.

It is also possible to store multiple POTCAR files in a compressed archive (using ArchiveData).

The facade then serves as input to calculations, while whenever the file must be read or written, the full node is found via querying for the file hash.

For reading / writing the files pymatgen will be used

Why not links to file paths?

  • file system links outside the repository break when exported data is imported on another machine. This makes manual intervention necessery everytime someone wishes to rerun an experiment from someone else
  • files are mutable

Why not a environment variable like pymatgen?

  • This requires a defined format for storing POTCAR files
  • Reusing the one of pymatgen is possible but is an unneccessary dependency and requires even non-pymatgen users to configure pymatgen

Experiment with alternative storage format for POTCAR files

Try out the following ideas:

  • PotcarFileStore: one node that stores all the files in one compressed archive.
  • Storing only a setting with a path to where the files are stored (in original or pymatgen format)

Both of these require

  • A user setting to choose between methods
  • Changes to PotcarData.find_file_node()

Create a pymatgen based VaspCalculation parser

  • unittests for BaseParser
  • write very basic PymatgenParser with tests: kpoints and structure output nodes
  • test PymatgenParser with broken xml -> #35
  • add forces output node & tests
  • add energies output node & tests
  • add bandstructure output node & tests
  • add DOS outupt node & tests
  • add born charges, epsilon & tests

Request: energy and forces parsing

Hi,

I would like to use AiiDA to make phonon calculations.
Therefore I need this plugin to parse at least total energy and atomic forces to be able to test it.
I suggest to use the same quantumespresso scheme:
Energy in output_parameters node (ParametersData) and forces in output_array node (ArrayData).
Also to parse stress tensor would be nice.

I think it is important to keep the output structure as close as possible among all the plugins.
Then, developing workflows that work using many codes is much easier.

Thanks,

installation

I think that something has changed:
the installation looks for aiida-core/aiida/djsite/db/subtests while now it is aiida-core/aiida/backends/djsite. It seems that there is a backend more.

Empty res return (default parser output node names are outdated)

Seems res returns empty after finishing one of the examples:

(envaiida)[efl@efl examples]$ python run_vasp.py simple VASP computer
(envaiida)[efl@efl examples]$ verdi calculation list -a
# Last daemon state_updater check: 0h:00m:12s ago (at 09:53:18 on 2017-12-19)
PK Creation State Sched. state Computer Type
---- ---------- ---------------- -------------- ---------- ---------
427 4m ago WITHSCHEDULER QUEUED cluster2 vasp.vasp
432 2m ago FINISHED DONE cluster1 vasp.vasp
442 55s ago FINISHED DONE cluster1 vasp.vasp
(envaiida)[efl@efl examples]$ verdi calculation res 442
{}
(envaiida)[efl@efl examples]$
(envaiida)[efl@efl examples]$ verdi data bands list
ID formula ctime label
435 Si 19 Dec 2017
445 Si 19 Dec 2017
(envaiida)[efl@efl examples]$ verdi data structure list
ID formula label
431 Si
441 Si
(envaiida)[efl@efl examples]$ verdi data structure export --format xyz 441
1
Lattice="2.7 2.7 0.0 2.7 2.7 0.0 2.7 2.7 0.0" pbc="True True True"
Si 1.3500000000 1.3500000000 1.3500000000

Data is certainly there, at least partially. Happy to contribute.

Add unit tests where it makes sense

  • VaspCalculation
  • Vasp2W90Calculation
  • VaspParser
  • Vasp2W90Parser
  • IO parsers / writers
  • vasprun parser
  • incar parser + writer
  • kpoints parser + writer
  • poscar parser + writer
  • potcar parser + writer
  • eigenval parser
  • doscar parser
  • utilities
  • calculation builder

Revise logic for recognising static, relaxation, md, and cell shape relaxation in the vasprun parser

https://github.com/DropD/aiida-vasp/blob/437d0c40536938de4ecf991ec491b0b3d1db85d1/aiida_vasp/parsers/vasp.py#L148

Currently the unit cell is been taken from the output structure if is_md == true ( which is equivalent to IBRION !in [-1, 1, 2]). Whether or not the cell changes during a calculation is however determined by the value of ISIF and actually requires IBRION in [1, 2, 3]. If ISIF < 3 only the positions of the atoms are allowed to change. If ISIF >= 3 the cell shape or volume can change depending on the exact value of ISIF. The possible values for IBRION are:

  • -1 = static calculation with increased accuracy for the eigenvalues
  • 0 = Ab-initio molecular dynamics with a timestep provided by POTIM
  • 1, 2, 3 = relaxation of atom positions and/or cell shape determined by ISIF
  • >3 = Calculation of Hessian matrix

This might change the logic for is_static, is_md, and is_relaxation in io/vasprun.py as well. In particular even a calculation with IBRION = 1, 2, 3 can be considered static if NSW = 0, which means no ionic steps are taken.

Precision of POSCAR file insufficient

In the current implementation (development branch) the POSCAR files are generated with 6 decimal places. I think that this is not enough for high precision calculations. At least 10 decimal places are necessary.

Additional optional input

It is possible to give input files containing kernels for van der vaals density function. This should be an optional input file for vasp.vasp. The name for this file is vdw_kernel.bindat.

POSCAR sorting leads to swapped atomic position in output structure

It seems the default parser is mixing up the input structure with results for the sorted structure. I can see two solutions:

  • Revise the parser and put rigorous tests in place, possibly change the sorting to only group together elements and never change the order
  • Reject ungrouped structures and request the user group them before using them as input (much less work).

Ungrouped structures can and should actually be supported. It is simply a question of concatenating the POTCAR files in the same ungrouped order. This can even be desirable, as different potentials might be chosen for different sites with the same element.

About pymatgen plugin

I'm testing the VASP pymatgen parser and I noticed that the outputs are quite different from QE plugin.
Maybe my plugin is a little outdated. Do you know if this is the structure that they will use?

If not, theses are the suggestions for pymatgen parser outputs to make it closer to QE:

node name contains
output_trajectory structure, forces, stress tensor, energy, etc. at each electronic step
output_structure structure
born_charges born_charges and dielectric tensor

output_trajectory node is convenient for MD and optimizations but I think it is OK to create it
for any calculation so the access to forces and stress is common for all types of calculations.

output_structure node: since QE seems to use this name let's follow.

born_charges node is just for my convenience since I don't know how to obtain the born charges and dielectric tensor from QE (if it's possible). I need this information to calculate the non analytical correction for phonons so if they are together in one node it is easier for my workflows.

Does the current version number make sense?

As far as I understand, the version was previously just tied to the AiiDA version. Since that no longer makes sense, should we reset the version number? Or just continue from here? Since there wasn't an official (PyPI) release yet, I think both options would be ok.

Suggestion: This example is a bit to complex

I experienced some issus with VASP compilation to run this example.
I think a simpler fast example should be better as a initial test example.
A simple prototype material like Si, MgO or NaCl could be a good option with a very
minimal input like:

PREC: NORMAL
ENCUT: 200
EDIFF: 1e-08
IALGO: 38
ISMEAR: 0.0
SIGMA: 0.1

The idea to use as few external packages as possible to create the structure is good.
For an initial test only aiida provided structure object method is better.

https://github.com/DropD/aiida-vasp/blob/317a9ce56d7c5a346f7332b51f9d05908fb0991b/examples/run_vasp.py#L68

make vasprun parser read unfinished vasprun.xml

When VASP crashes it does not close the vasprun xml tags but sometimes information can still be obtained from it. The parser should try it's best in this case (ad probably emit a warning)

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.