vasp-dev / py4vasp

Python interface for VASP
https://vasp.at/py4vasp/latest/
Apache License 2.0
74 stars 20 forks source link

Suggestion: An graphical user interface like p4vasp #39

Closed Satinelamp closed 1 year ago

Satinelamp commented 2 years ago

Since the development of p4vasp has stopped, I suggest it would be very helpful to develop an alternative user interface based on py4vasp.

martin-schlipf commented 2 years ago

We don't have any immediate plans to work on a graphical user interface. For the moment interacting with the data produced by VASP within a Jupyter environment is fine for us. Are there any specific things you have in mind that you could do with a GUI that would not be possible within a Jupyter notebook?

Satinelamp commented 2 years ago

In p4vasp, I'd like to see the atoms' movement during the relaxation, and also, I could choose some atoms, and fix their coordinates, generate a new POSCAR file. I am not sure how to do that with py4vasp. Is there a tutorial on how to use py4vasp in Jupyter?

martin-schlipf commented 2 years ago

The creation of input files is currently not supported, but this is planned for a future release of py4vasp. Visualization of the structure during a relaxation or MD simulation is already possible. We have updated a part of the tutorials to make use of py4vasp (https://vasp.at/tutorials/latest/) and will work on porting more and more of them to this new framework. At the beginning of these tutorials, you will find a brief introduction to the Jupyter environment and see some ways py4vasp can be used.

Satinelamp commented 2 years ago

I checked the tutorial (https://vasp.at/tutorials/latest/), it is very complete, but it is not very user-friendly for people who don't do coding much. For normal academia or students, maybe there should be more examples and explanations of py4vasp's structure and usage. For example, not a lot of people are familiar with the concept of the "wrapper", although it is not complicated.

martin-schlipf commented 2 years ago

Thank you for the comments. We have already considered some options to improve the documentation of py4vasp. Adding more examples to the documentation the way that numpy does it, would be a great addition. We might also add a specific tutorial for py4vasp at some point.

Satinelamp commented 2 years ago

Is it possible to read the data from the HDF5 file using py4vasp during the simulation? For example, during the structure relaxation, I'd like to check the energy convergence trend. Usually, I would check the data in OSZICAR or OUTCAR, would VASP update the data in the HDF5 file during each electronic or ionic step?

martin-schlipf commented 2 years ago

The data is written at the end of every step so in principle it should work to access the energy during the iteration. There may be a bit of a delay because potentially the data get buffered before it is written to file.

However, note that you need to be careful when you do that. HDF5 doesn't like when you open the file multiple times including write access. In particular, one way that fails is if you open the file in Python and then run VASP while the file is still open.

The top-level py4vasp wrapper routines will only read from the file and close it immediately afterward. This avoids this issue. But if you write more advanced scripts interacting with the lower-level routines that require manual handling of the HDF5 file it is something to be aware of.

Satinelamp commented 2 years ago

Here is an example about installing HDF5: ./configure --enable-parallel --prefix=/home/shreeja/local/ --enable-fortran --disable-shared --enable-cxx --enable-fortran2003 --enable-unsupported --with-zlib=/home/shreeja/local As you could see, there are a lot of options, is there a recommended setting when installing HDF5 on the cluster?

martin-schlipf commented 2 years ago

This is what we use

#Intel
./configure --enable-fortran --enable-parallel --prefix=directory_name CC=mpiicc FC=mpiifort
#GNU
./configure --enable-fortran --enable-parallel --prefix=directory_name CC=mpicc FC=mpif90
Satinelamp commented 2 years ago

If I'd like to get the electron occupation of atom-1's d orbital, which method in py4vasp should I use? I only found there are methods of Born Effective Charge in the tutorial. charge at d site

martin-schlipf commented 2 years ago

The charges are the 0th component of the magnetic moments https://vasp.at/py4vasp/latest/data/magnetism/

Satinelamp commented 2 years ago

Is it possible to get the detailed information in WAVECAR with py4vasp? for example, I would like to use py4vasp to replace [VaspBandUnfolding] and CA-NAC, which could read the WAVECAR file and generate the Nonadiabatic Coupling between different orbitals. I am not sure if all the information in WAVECAR is stored in HDF5 files.

martin-schlipf commented 2 years ago

At the current stage, reading the orbitals with py4vasp is not supported. The data can be written to hdf5, but we need to optimize this writing for performance first, before we can expose it to users. Which specific data would you like to access, the pseudo-orbitals on the FFT grid or something else?

Satinelamp commented 2 years ago

I'd like to calculate the COHP, which requires getting the wavefunction data of each orbital.

martin-schlipf commented 2 years ago

Sorry, perhaps I should have elaborated a bit more: VASP uses the PAW methods, so we have two different orbitals:

Which of these two orbitals do you need?

Satinelamp commented 2 years ago

The all-electron orbitals

martin-schlipf commented 2 years ago

I'll investigate how difficult it would be to write this data to HDF5 and make it available via py4vasp.

github-actions[bot] commented 1 year ago

We consider issues as stale if there has been no activity in them for 10 months.

github-actions[bot] commented 1 year ago

This issue was closed after 1 year of inactivity.