Skip to main content

Python package for manipulating Octopus output files

Project description

octopuspy

Build Status Test Coverage

octopuspy is a Python package that allows for the manipulation and processing of files generated by the Octopus DFT scientific program. This package was created with the intent of using with the effmass package.

Installation

octopuspy can be installed from PyPI:

pip install octopuspy

Or download the source code and install:

git clone https://github.com/afatt/octopuspy.git
cd octopuspy
python3 setup.py install

How To Use

Required Octopus files: bandstructure, info, results.out(typically out.log), eigenvalues, and total-dos-efermi.dat

API

bandstructure file includes: number of kpoints, number of bands, energies:

band_data = Bandstructure(filepath='./GaAs_HSE06', name='GaAs_HSE06_04092021')

info file includes: direct lattice vector, reciprocal lattice vector, and number of ions:

info_data = Info(filepath='./GaAs_HSE06')

results.out file includes: kpoint weights. results.out is obtained by redirecting the stdout to a new file named results.out when running Octopus.Octopus > results.out. More explanation found on the Octopus wiki here

results_out = Results(filepath='./GaAs_HSE06', band_data.num_kpoints)

Scripts

The octopuspy package includes the script octo2vasp.py for converting the bandstructure, info, results.out, eigenvalues files into VASP PROCAR and OUTCAR files.⚠️ The PROCAR and OUTCAR files generated are not true VASP files, they contain only the minimum data required to use in the effmass package.

Copy your Octopus files: bandstructure, info, results.out, and eigenvalues into a new folder anywhere inside the octopuspy package and run:

cd scripts
python3 octo2vasp.py --name name_of_semiconductor

The octo2vasp.py script will write the PROCAR, OUTCAR, and a bandstructure_plot.png to the gen_vasp folder inside the octopuspy package.

Recommended Octopus Settings

Garbage in equals garbage out and testing this package produced a lot of garbage. Included with this package are Octopus settings that helped to achieve results matching the literature anotated_example_inp. The inp file is also included with each set of /test_data for reference. More information about input settings can be found on the Octopus wiki here

Testing

Unittests are included with this package and can be run using:

python3 -m unittest discover

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

octopuspy-1.0.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

octopuspy-1.0.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file octopuspy-1.0.1.tar.gz.

File metadata

  • Download URL: octopuspy-1.0.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.5

File hashes

Hashes for octopuspy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 35ec453d73502d5cab08be4b677421c194784f96c32589e8ebc1683612b619b9
MD5 d78411fcd67c7ea7f3399e0d1084e0fc
BLAKE2b-256 67d5c090136003f36b4be3d235c44e472c1ca69ad4ce8efbab321f3ba62e48bd

See more details on using hashes here.

File details

Details for the file octopuspy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: octopuspy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.5

File hashes

Hashes for octopuspy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cfc5f42f63490bcc40467079dde82146cdd4bdde10f80b669f6955d7f5f859ff
MD5 87f9fd03b36c51eada6225adc406673a
BLAKE2b-256 bf634eb637aee11515a7918673b701700665dc2a9adc9cdba5fa5541661922a3

See more details on using hashes here.

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