Skip to main content

A pymatgen add-on for IO for the fleur code.

Project description

MIT license GitHub version PyPI version PyPI pyversion Build status Coverage Status

Pymatgen-io-fleur

This is a pymatgen IO addon for the LAPW code fleur. This addon includes:

  • Reading/writing input files for the the fleur input generator (inpgen)

  • Reading of xml files used by the main fleur code

Installation

pip install pymatgen-io-fleur

Usage

This addon adds a class FleurInput to the pymatgen IO namespace, which can read in inpgen and inp.xml files and can write inpgen input back out.

Initializing a FleurInput from a file

from pymatgen.io.fleur import FleurInput

#From inpgen input (automatically detected by missing xml in extension)
fleur_inp = FleurInput.from_file('inp_example')

#From XML input
fleur_inp = FleurInput.from_file('inp.xml')

#The object has the following attributes
print(fleur_inp.structure)        #Associated structure
print(fleur_inp.title)            #Optional title string
print(fleur_inp.lapw_parameters)  #dict with additional LAPW parameters

Writing inpgen input back out

fleur_inp.write_file('inp_new')

#Adding some additional LAPW parameters
fleur_inp.write_file('inp_new', parameters={'comp': {'kmax': 4.5}})

Usage from pymatgen Structure object

from pymatgen.core import Structure

#inpgen input (filename starts with inp_)
s = Structure.from_file('inp_test')

#XML input (filename is of the form inp*.xml)
s = Structure.from_file('inp.xml')

s.to('inp_example',format='fleur-inpgen')

License

pymatgen-io-fleur is distributed under the terms and conditions of the MIT license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymatgen-io-fleur-0.5.0.tar.gz (17.0 kB view hashes)

Uploaded Source

Built Distribution

pymatgen_io_fleur-0.5.0-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page