Skip to content

Commit

Permalink
first draft of bulk!, repeat and rattle!
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaMolSim committed May 14, 2024
1 parent 87f039a commit db7fba7
Show file tree
Hide file tree
Showing 10 changed files with 1,227 additions and 8 deletions.
17 changes: 15 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,24 @@ uuid = "f5cc8831-eeb7-4288-8d9f-d6c1ddb77004"
authors = ["Christoph Ortner <[email protected]> and contributors"]
version = "0.0.1-dev"

[deps]
AtomsBase = "a963bdd2-2df7-4f54-a1ee-49d51e6be12a"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[compat]
julia = "1.6.7"
AtomsBase = "0.3.5"
JSON = "0.21.4"
LinearAlgebra = "1.9"
StaticArrays = "1.9"
Unitful = "1.19"
julia = "1.9"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
JuLIP = "945c410c-986d-556a-acb1-167a618e0462"

[targets]
test = ["Test"]
test = ["Test", "JuLIP"]
48 changes: 45 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# AtomsBuilder

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaMolSim.github.io/AtomsBuilder.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaMolSim.github.io/AtomsBuilder.jl/dev/)
[![Build Status](https://github.com/JuliaMolSim/AtomsBuilder.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaMolSim/AtomsBuilder.jl/actions/workflows/CI.yml?query=branch%3Amain)
<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaMolSim.github.io/AtomsBuilder.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaMolSim.github.io/AtomsBuilder.jl/dev/)-->
[![Build Status](https://github.com/JuliaMolSim/AtomsBuilder.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaMolSim/AtomsBuilder.jl/actions/workflows/CI.yml?query=branch%3Amain)

This package provides utilities to build atomic structures. At the moment the functionality is very limited - see examples below.


## Preliminary Documentation

Currently there are just two exported functions:
* `bulk`
* `rattle!`
In addition we overload
* `repeat` (with alias `*`)

```julia
using AtomsBuilder

# generate a diamond cubic bulk Si unit cell
at1 = bulk(:Si)
@show length(at1)

# generate a minimal cubic Si cell (diamond cubic)
at2 = bulk(:Si, cubic=true)
@show length(at2)

# repeat the cell 3 times in each coordinate direction
at3 = at2 * 3
@show length(at3)

# repeat the unit cell in only one direction
at4 = at2 * (3, 1, 1)
@show length(at3)

# create a bulk supercell and then rattle the atoms
at5 = rattle!( bulk(:Si, cubic=true) * 3 )
```

See `?bulk` and `?rattle!` for more information.

## Contributions

The current version of the package is essentially a copy-paste of a subset of functionality from an older package that is no longer developed. Contributions to expand the capabilities, improve the implementation, or entirely replace it are very welcome. Some packages that contain overlapping functionalities that could replace or add to `AtomsBuilder.jl` include
* [`Electrum.jl`](https://github.com/brainandforce/Electrum.jl)
* [`AtomsToolbox.jl`](https://github.com/rashidrafeek/AtomsToolbox.jl)
Loading

0 comments on commit db7fba7

Please sign in to comment.