Skip to content

Commit

Permalink
quick update lappy
Browse files Browse the repository at this point in the history
  • Loading branch information
kfgarrity committed Mar 2, 2024
1 parent 9f1fbf3 commit 1a923bf
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ New version of the code featuring
Bulk AlP self-consistent field calculation and band structure plot.

```
using ThreeBodyTB
#define crystal
c = makecrys([0 2.8 2.8 ; 2.8 0.0 2.8; 2.8 2.8 0.0], [0 0 0; 0.25 0.25 0.25], [:Al, :P])
Expand Down
4 changes: 2 additions & 2 deletions docs/src/POSCAR_alp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AlP
1.0
2.6 2.6 0
2.6 0 2.6
0 2.6 2.6
2.6 0 2.6
2.6 2.6 0
Al P
1 1
Direct
Expand Down
7 changes: 6 additions & 1 deletion docs/src/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ scf_energy_force_stress
relax_structure
read_tb_crys
write_tb_crys
get_symmetry
get_standard_crys
```

## Plotting

```@docs
plot_bandstr
plot_bandstr_sym
plot_bandstr_dos
dos
dos_realspace
plot_compare_dft
plot_compare_tb
band_summary
Expand All @@ -30,6 +35,6 @@ band_summary
set_units
Hk
calc_bands
calc_tb_fast
set_bin_dirs
```

17 changes: 17 additions & 0 deletions docs/src/every.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@ Modules = [ThreeBodyTB.SCF]
Modules = [ThreeBodyTB.Utility]
```

## Symmetry

```@autodocs
Modules = [ThreeBodyTB.Symmetry]
```

## Classical

-experimental
```@autodocs
Modules = [ThreeBodyTB.Classical]
```

## ClassicalFit

-experimental
```@autodocs
Modules = [ThreeBodyTB.ClassicalFit]
```

9 changes: 9 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ ThreeBodyTB.jl is a package for tight-binding, written in [Julia](https://julial
- Includes self-consistent treatment of long-range Coulomb interaction.
- Plotting based on interface of [Plots.jl](http://docs.juliaplots.org/latest/)

### New features

- Larger and better tested set of coefficients
- Coefficients for three-atom interactions for thousands of common combinations
- Magnetism (set `nspin=2` in `scf_energy` and similar functions)
- Charged unit cells
- Sparse matrix implementation of many key functions
- Improved performance

## User's guide

```@contents
Expand Down
3 changes: 3 additions & 0 deletions docs/src/structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
```@docs
crystal
tb
tb_sparse
tb_crys
tb_crys_dense
tb_crys_sparse
```
31 changes: 31 additions & 0 deletions docs/src/ug_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,26 @@ savefig("alp_dos.png"); #hide

Project onto orbitals instead with `proj_type=:orbs`

### Symmetry-enabled plotting

Plot bandstructure path with symmetry:
```
plot_bandstr_sym(tbc_alp, kpath=kpath, names=knames, npts=100, proj_orbs=[:s], proj_types=["Al"], do_display=false);
savefig("alp3.png"); #hide
```

![AlP plot 3](alp3.png)

Plot bandstructure with DOS:
```
plot_bandstr_dos(tbc_alp, kpath=kpath, names=knames, npts=100, proj_orbs=[:s], proj_types=["Al"], do_display=false);
savefig("alp4.png"); #hide
```

![AlP plot 4](alp4.png)



## **Calculate force / stress**

With [`scf_energy_force_stress`](@ref)
Expand Down Expand Up @@ -114,4 +134,15 @@ Energy is lower, stress is near zero, forces are zero by symmetry in Zinc Blende

Force/Stress defaults are eV/Ang and eV/Ang^3.

## **Magnetic calculations**

Set `nspin=2`, default is ferromagnetic.

```@example 1
c_hatom = makecrys([10.0 0 0; 0 10.0 0; 0 0 10.0], [0 0 0], [:H])
en, tbc, flag = scf_energy(c_hatom, nspin=2)
plot_bandstr(tbc, do_display=false)
savefig("h_bands.png"); #hide
```
![H atom bands](h_bands.png)

0 comments on commit 1a923bf

Please sign in to comment.