Package for converting CASTEP .phonon files to .json files.
Project description
phonon-to-json
Converts CASTEP .phonon files into .json files readable by TSS Physics Phonon Visualiser.
Install
To install phonon-to-json
run:
pip install phonon-to-json
Dependencies
phonon-to-json
requires
castep-outputs
spglib
numpy
Command line
phonon-to-json
is designed to be run as a command line tool. To run:
python3 phonon_to_json.py [filename] [name] [formula]
[filename]
is the name of the .phonon file (excluding the .phonon extension)[name]
is the name of the compound, as displayed at the top of the website[formula]
is the chemical formula of the compound
As a module
To use phonon-to-json
as a module import json_dumper
:
import phonon_to_json as pj
filename = "[filename]"
name = "[name]"
formula = "[formula]"
r_data = pj.read_file(filename)
w_data = pj.read_to_write(r_data, name, formula)
pj.write_file(filename, w_data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
phonon_to_json-0.0.2.tar.gz
(40.8 kB
view hashes)
Built Distribution
Close
Hashes for phonon_to_json-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854ae093436a1b4eb33f05fe58058b9f9d26b1e324e3d6128dc76af959220e21 |
|
MD5 | 177f2434057cc8bff4a8d51b599a29d1 |
|
BLAKE2b-256 | e3b0be54033e0d924b76555d43bbe6d715678d7d69c9ad229756fa0dee20acec |