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.3.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

octopuspy-1.0.3-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: octopuspy-1.0.3.tar.gz
  • Upload date:
  • Size: 12.3 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.3.tar.gz
Algorithm Hash digest
SHA256 7635335d8c2939dedf569bfaa2619416fc170a3154f9a39f5fc5e5c75839b128
MD5 77a75fe583e9bc58004d2c4b37c3dc0f
BLAKE2b-256 984e9a4a8a81378101e5790353a8191b22248ec275217acf8b25766f113fbb6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: octopuspy-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8046a870b5cfa36a97209d737925b0625a2d4a8cd6e9ed66e9e5a92b2fcb0d47
MD5 28e5c362457865b70ee5b5371e73e92e
BLAKE2b-256 217c5e46a59c3aaaf31187a44adfbaa075bc7013b05011d2cc26053ccd3fa155

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