Skip to main content

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

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


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)

Uploaded Source

Built Distribution

phonon_to_json-0.0.2-py3-none-any.whl (10.7 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