Metadata-Version: 2.4
Name: TB2Jflows
Version: 0.2.1
Summary: TB2Jflows: Workflows for automatically calculation of exchange parameters using TB2J
Author-email: Xu He <mailhexu@gmail.com>
License: BSD-2-clause
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.6
Requires-Dist: ase
Requires-Dist: phononkit
Requires-Dist: sisl
Requires-Dist: tb2j
Description-Content-Type: text/markdown

# TB2Jflows
Workflows for automatically calculation of exchange parameters from DFT

## Installation

First download the package from the github page. Run the following command in the TB2Jflows directory

```
pip install . --user
```

will install TB2Jflows and the dependencies.

You need the following things to 

- Siesta built with psml and netcdf.
- Pseudopotentials from PseudoDojo Dataset. 
- Configure the command to run siesta and the path to the pseudopotentials, e.g.

```
export ASE_IESTA_COMMAND="mpirun siesta < PREFIX.fdf > PREFIX.out 2> PREFIX.err"
export DOJO_PATH='$HOME/.local/pp/dojo'
```

## Usage

Below is an example of calculating the exchange parameters of SrMnO3:

```python
from ase.io import read
from TB2Jflows import SiestaFlow


def calculate_siesta_TB2J_SrMnO3():
    atoms = read('SrMnO3.STRUCT_OUT')
    atoms.set_initial_magnetic_moments([0, 3, 0, 0, 0])
    flow = SiestaFlow(atoms,
                      spin='spin-orbit',
                      restart=True,
                      root_path='SrMnO3')
    flow.write_metadata()
    atoms = flow.relax(atoms)
    flow.scf_calculation_with_rotations(atoms)
    flow.run_TB2J(magnetic_elements='Mn',
                  nz=50,
                  kmesh=[7, 7, 7],
                  Rcut=18,
                  np=10,
                  use_cache=True)
    flow.run_TB2J_merge()


if __name__ == '__main__':
    calculate_siesta_TB2J_SrMnO3()
~                                     
```

