Git Product home page Git Product logo

qeinput's Introduction

QEInput (Under Construction)

Python Package for automatic generation of Quantum ESPRESSO input files and Slurm scripts.

Install

pip install .

Sample

Generate a job script job.sh to run pw.x calculations of silicon using data on Materials Project.

./samples/generate_jobscript.py

#!/usr/bin/env python
from qeinput.material import Material
from qeinput.inputs import SlurmJob, InputPWSCF, InputPWNSCF, InputPWVCRelax


def main():
    qe_dir = "./"
    job = SlurmJob("PartitionName", 1, 128, 1)

    key = "Your API key of the Materials Project"

    Si = Material(key, "mp-149")
    prefix = Si.formula_pretty
    pseudo_dir = "./pseudo_dir"
    outdir = "./tmp"

    Si_input_scf = InputPWSCF(Si, pseudo_dir, outdir, 60, [8, 8, 8])
    Si_input_nscf = InputPWNSCF(Si, pseudo_dir, outdir, 60,
                                [[0.0, 0.0, 0.0]], 10)
    Si_input_vcrelax = InputPWVCRelax(Si, pseudo_dir, outdir, 60, [8, 8, 8])

    Si_inputs = {"scf": Si_input_scf,
                 "nscf": Si_input_nscf,
                 "vc-relax": Si_input_vcrelax}

    for calc, Si_input in Si_inputs.items():
        infile = prefix + "." + calc + ".in"
        outfile = prefix + "." + calc + ".out"
        Si_input.generate(infile)

        job.add_srun(qe_dir + "pw.x", "", infile, outfile)

    job.generate("job.sh")


if __name__ == "__main__":
    main()

To be implemented

  • pw.x (vc-relax)
  • ph.x
  • matdyn.x
  • q2r.x
  • epw.x

Disclaimer

I am not responsible for any detriment caused by the use of this package.

qeinput's People

Contributors

cohsh avatar

Stargazers

 avatar

Watchers

 avatar  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.