Skip to content

Commit

Permalink
- added miscellaneous notes as a documentation page
Browse files Browse the repository at this point in the history
  • Loading branch information
amkrajewski authored Nov 9, 2023
1 parent d12671c commit 293dccd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ Index

.. toctree::
install
source/pysipfenn
exportingmodels
faq
source/pysipfenn
miscellaneousnotes
examples/sipfenn_examples
Journal Article <https://doi.org/10.1016/j.commatsci.2022.111254>
changelog
Expand Down
25 changes: 25 additions & 0 deletions docs/miscellaneousnotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Miscellaneous Notes for Users

## General Useful Tips

### Exporting Compressed Pymatgen Structures

Since [pymatgen v2023.05.31](https://github.com/materialsproject/pymatgen/releases/tag/v2023.05.31), or [PR#3003](https://github.com/materialsproject/pymatgen/pull/3003), you can compress Structure objects you export to JSON as in this simple example below. Considering the high volume of JSON's "boilerplate" in them, this should allow you to reduce file size by around half.

```python
from pymatgen.core import Lattice, Structure

FeO = Structure(
lattice=Lattice.cubic(5),
species=("Fe", "O"),
coords=((0, 0, 0), (0.5, 0.5, 0.5)),
)

structure.to("FeO.json.gz")
structure.to("FeO.json.bz2")
```

## pySIPFENN Tricks


## Experimental

0 comments on commit 293dccd

Please sign in to comment.