https://github.com/cedergrouphub/valencesolver
https://github.com/cedergrouphub/valencesolver
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cedergrouphub/valencesolver
- Owner: CederGroupHub
- Created: 2019-07-17T00:45:16.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-13T22:24:03.000Z (over 2 years ago)
- Last Synced: 2025-09-09T23:38:54.684Z (10 months ago)
- Language: Python
- Size: 76.2 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
This module is used to solve valence states of materials modified from Pymatgen default valence solver.
The principles to solve valence states is the same as Pymatgen, but it is faster.
Some packages need to be installed before use:
sympy
unidecode
Install:
git clone git@github.com:CederGroupHub/ValenceSolver.git
cd ValenceSolver
pip install -e .
Usage:
With a composition dict or a plain formula, the minimal code is as following. (example in example_basics/example_composition.py)
from ValenceSolver.core.composition_inhouse import CompositionInHouse
# The composition here is a plain dict like {'ele': number} without variables.
oxi_state, is_usual, comments = \
CompositionInHouse.get_most_possible_oxi_state_of_composition(composition)