Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lattice provided to BZ functions is now the real-space lattice. #2

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ docs/site/
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml

notebooks
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: julia

install:
- pip3 install scipy

os:
- osx

julia:
- 1.4

notifications:
email: false

script:
- julia --project --check-bounds=yes -e 'import Pkg; Pkg.build();
Pkg.activate("."); Pkg.test("IBZ", coverage=true)'

after_success:
- julia --project ./docs/make.jl
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage;
Coveralls.submit(process_folder())'

coveralls: true
9 changes: 8 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name = "IBZ"
uuid = "49a35663-c880-4242-bebb-1ec8c0fa8046"
authors = ["John Christensen <johnedchristensen@gmail.com>"]
authors = ["Jeremy Jorgensen <jerjorg@gmail.com>"]
version = "0.1.0"

[deps]
CDDLib = "3391f64e-dcde-5f30-b752-e11513730f60"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Polyhedra = "67491407-f73d-577b-9b50-8179a7c68029"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
QHull = "a8468747-bd6f-53ef-9e5c-744dbc5c59e7"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# IBZ
A julia package for calculating the Irreducible Brillouin zone (IBZ) for any lattice.

Utilizes [phenumlib]( https://github.com/wsmorgan/phonon-enumeration) through [PyCall](https://github.com/JuliaPy/PyCall.jl) to get the point group.
[![Build Status](https://travis-ci.org/jerjorg/IBZ.svg?branch=master)](https://travis-ci.org/jerjorg/IBZ) [![Coverage Status](https://coveralls.io/repos/github/jerjorg/IBZ/badge.svg?branch=master)](https://coveralls.io/github/jerjorg/IBZ?branch=master)

Phenumlib and PyCall need to be installed.
# IBZ
A julia package for calculating the Irreducible Brillouin zone (IBZ) of a 2D or
3D crystal structure.
12 changes: 12 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
push!(LOAD_PATH,"../src/")
using Documenter, IBZ

makedocs(sitename="IBZ",
format = Documenter.HTML(prettyurls = false),
modules = [IBZ],
authors = "Jeremy Jorgensen",
pages=["index.md", "Documentation.md", "Usage.md"])

# deploydocs(
# repo = "github.com/jerjorg/IBZ.jl.git",
# )
53 changes: 53 additions & 0 deletions docs/src/Documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Documentation

## Index

### Lattices
```@index
Modules = [IBZ.Lattices]
Order = [:function, :type]
```

### Plotting
```@index
Modules = [IBZ.Plotting]
Order = [:function, :type]
```

### Symmetry
```@index
Modules = [IBZ.Symmetry]
Order = [:function, :type]
```

### Utilites
```@index
Modules = [IBZ.Utilities]
Order = [:function, :type]
```

## Functions

### Lattices
```@autodocs
Modules = [IBZ.Lattices]
Order = [:function, :type]
```

### Plotting
```@autodocs
Modules = [IBZ.Plotting]
Order = [:function, :type]
```

### Symmetry
```@autodocs
Modules = [IBZ.Symmetry]
Order = [:function, :type]
```

### Utilities
```@autodocs
Modules = [IBZ.Utilities]
Order = [:function, :type]
```
Empty file added docs/src/IBZ.md
Empty file.
37 changes: 37 additions & 0 deletions docs/src/Usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# User guide

`IBZ.jl` calculates the irreducible Brillouin zone (IBZ) of a crystal structure
in 2D and 3D. It also contains functions related to the symmetry of lattices and
lattice reduction. Later on, it will be able to calculate high symmetry points
and paths within the IBZ.

To calculate the IBZ, simply provide the lattice and atomic basis to `calc_ibz`.
The IBZ will be returned as either a convex hull or intersection of half spaces.
```@example
using IBZ # hide
a = 1.0;
real_latvecs = genlat_CUB(a)
atom_types = [0,0]
atom_pos = Array([0 0 0; 0.5 0.5 0.5]')
ibzformat = "convex hull"
coordinates = "Cartesian"
convention = "ordinary"
ibz = calc_ibz(real_latvecs,atom_types,atom_pos,coordinates,ibzformat,
convention)
```
The columns of `real_latvecs` are the lattice generating vectors, the columns
of `atom_pos` are the positions of the atoms in Cartesian coordinates (in this
case), `coordinates` are the coordinates of the atom positions, and `convention`
gives the convention for going from real to reciprocal space (whether or not to
multiply by 2π). There is a simple function for visualizing the IBZ along with
the Brillouin zone (BZ).
```@example
using IBZ # hide
a = 1.0 # hide
real_latvecs = genlat_CUB(a) # hide
atom_types = [0,0] # hide
atom_pos = Array([0 0 0; 0.5 0.5 0.5]') # hide
coordinates = "Cartesian" # hide
convention = "ordinary" # hide
plot_cells(real_latvecs,atom_types,atom_pos,coordinates,convention)
```
9 changes: 9 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Home

`IBZ.jl` is a julia package for calculating the irreducible Brillouin zone. It
also contains methods related to the symmetry of lattices and lattice reduction.

```@contents
Pages = ["Usage.md", "Documentation.md"]
depth = 5
```
Loading