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.

Project details


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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pymatgen-io-fleur-0.5.0.tar.gz.

File metadata

  • Download URL: pymatgen-io-fleur-0.5.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.30.0

File hashes

Hashes for pymatgen-io-fleur-0.5.0.tar.gz
Algorithm Hash digest
SHA256 666ddca1c6d60d0be83c01eff25bc1e0c31872c5caf2c434b505d8088ee9f299
MD5 c3ead391278e0203fcfc678e929e3cb4
BLAKE2b-256 d172c490c76005ee21250b53482999c255fd951dedf68fc5bcec128fb7caf7a9

See more details on using hashes here.

File details

Details for the file pymatgen_io_fleur-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pymatgen_io_fleur-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4022b19fc4f942d3c7379adace558b64a3adcb0206be935d6d133039b073d22f
MD5 0006b414135a973968f86fe28c0f785d
BLAKE2b-256 6807df56856e9b6725797becf871be9cd4579af6341d34b671c8ebbf9f23ff34

See more details on using hashes here.

Supported by

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