Giter Site home page Giter Site logo

santoshkumarradha / pyquestaal Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 1.3 MB

Python class to interface with QUESTAAL Quantum codes which is a suite of electronic structure programs.

License: MIT License

Python 99.59% Shell 0.41%
python questaal condensed-matter-physics electronic-structure dft physics gw qsgw ase pymatgen

pyquestaal's Introduction

PyQUESTAAL

DOI

This is a calculator class that has been written to interface calculations done using QUESTAAL with highthroughput calculators like ASE.

Note: The module can be used as a stand alone python controller for questaal jobs as well.

Features

  • make symmetry line files supported by QUESTAAL on the fly with a given structure
  • plot bands directly (requires plotquestaal.py)
  • relaxations included
  • can read forces from output files
  • Control number of processors

Installation

  1. Copy the files lmf.py to the working directory
  2. Import them and use !
  3. Make sure "lmf" is recognizable in the path and also modify the type of mpi call. default "mpirun"

Examples

Simple example usage shown in simple_examples.ipynb Comprehensive example shown in tutorial_example.ipynb

To use it with ASE, one can do something like

from lmf import lmf #load the lmf calculator
import numpy as np
from ase.io import read
from ase.units import kJ
from ase.eos import EquationOfState
from ase import Atoms
from ase.io.trajectory import Trajectory
def test():
    a = 4.0  # approximate lattice constant
    b = a / 2
    ag = Atoms('Ag',
               cell=[(0, b, b), (b, 0, b), (b, b, 0)],
               pbc=1,
               calculator=lmf()) # Use QUESTAAL's LMF as calculator
    cell = ag.get_cell()
    traj = Trajectory('Ag.traj', 'w')
    for x in np.linspace(0.95, 1.05, 5):
        ag.set_cell(cell * x, scale_atoms=True)
        ag.get_potential_energy()
        traj.write(ag)
    

    configs = read('Ag.traj@0:5')  # read 5 configurations
    # Extract volumes and energies:
    volumes = [ag.get_volume() for ag in configs]
    energies = [ag.get_potential_energy() for ag in configs]
    eos = EquationOfState(volumes, energies)
    v0, e0, B = eos.fit()
    print(B / kJ * 1.0e24, 'GPa')
    eos.plot('Ag-eos.png')
test()

Citation

If you find this work useful, please cite using

@misc{https://doi.org/10.5281/zenodo.4292415,
  doi = {10.5281/ZENODO.4292415},
  url = {https://zenodo.org/record/4292415},
  author = {Radha, Santosh Kumar},
  title = {pyQuestaal: An python interface or Questaal quantum codes.},
  publisher = {Zenodo},
  year = {2020},
  copyright = {Open Access}
}

To Do

  • control over all variables
  • Interface with pyamtgen
  • Add the developed lattice relaxation module which uses Genetic Algorithm
  • Make more standalone
  • More complex parser for questaal output (look for questaal-reader repo)

pyquestaal's People

Contributors

santoshkumarradha avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyquestaal's Issues

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.