https://github.com/juliamolsim/julip.jl
Julia Library for Interatomic Potentials
https://github.com/juliamolsim/julip.jl
julia
Last synced: 12 days ago
JSON representation
Julia Library for Interatomic Potentials
- Host: GitHub
- URL: https://github.com/juliamolsim/julip.jl
- Owner: JuliaMolSim
- License: other
- Created: 2016-06-14T14:44:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T20:05:05.000Z (7 months ago)
- Last Synced: 2025-03-20T10:55:24.339Z (about 1 month ago)
- Topics: julia
- Language: Julia
- Size: 2.63 MB
- Stars: 85
- Watchers: 10
- Forks: 23
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# JuLIP: Julia Library for Interatomic Potentials
| **Build Status** | **Social** |
|:-:|:-:|
|  | [![][gitter-img]][gitter-url] |A package for rapid implementation and testing of new interatomic potentials and
molecular simulation algorithms. There are versions for Julia v0.5.x, 0.6.x and
1.x. All development is for v1.x. Documentation is essentially non-existent but
the inline documentations is reasonably complete, and there are extensive tests that can be read in the absence of examples.The design of `JuLIP` is heavily inspired by [ASE](https://gitlab.com/ase/ase).
The main motivation for `JuLIP` is that, while `ASE` is pure Python and hence
relies on external software to efficiently evaluate interatomic potentials,
Julia allows the implementation of fast potentials in pure Julia, often in just
a few lines of code. `ASE` bindings compatible with `JuLIP` are provided by
[ASE.jl](https://github.com/cortner/ASE.jl.git). There are also reverse
bindings available via [`pyjulip`](https://github.com/casv2/pyjulip) which enable using `JuLIP` models from `ASE`Contributions are very welcome, especially for producing examples and tutorials. Any questions or suggestions, please ask on [![][gitter-img]][gitter-url], or simply open an issue.
# Installation
The latest versions of JuLIP are no longer installed in the `General` registry.
To use these versions, you will first need to install the [`ACE` registry](https://github.com/ACEsuit/ACEregistry) via
```julia
] registry add https://github.com/ACEsuit/ACEregistry.git
```
Then, to install `JuLIP`,
```julia
] add JuLIP
```# Units system
JuLIP follows [ASE's unit system](https://wiki.fysik.dtu.dk/ase/ase/units.html),
namely the energy units are eV (electron Volt), distances units are Angstrom
and mass units are amu (atomic mass units). If you have
Python available, conversion constants can be imported from ASE via `@pyimport
ase.units as ase_units`. Note: (i) that these are different
from atomic units (Hartree/Bohr) and (ii) this choice of unit system leads to an
unconventional unit for time, rather than the more widely uses femtoseconds.# Examples
The following are some minimal examples to just get something to run.
## Vacancy in a bulk Si cell
```julia
using JuLIP
at = bulk(:Si, cubic=true) * 4
deleteat!(at, 1)
set_calculator!(at, StillingerWeber())
minimise!(at)
@show energy(at)
# Visualisation is current not working
# JuLIP.Visualise.draw(at) # (this will only work in a ipynb)
```
see the `BulkSilicon.ipynb` notebook under `examples` for an extended
example.## Construction of a Buckingham potential
```julia
using JuLIP
r0 = rnn(:Al)
pot = let A = 4.0, r0 = r0
@analytic r -> 6.0 * exp(- A * (r/r0 - 1.0)) - A * (r0/r)^6
end
pot = pot * SplineCutoff(2.1 * r0, 3.5 * r0)
# `pot` can now be used as a calculator to do something interesting ...
# ... or something boring
at = rattle!(bulk(:Fe, cubic=true) * 4, 0.1)
energy(pot, at)
```## Site Potential with AD
```julia
using JuLIP
# and EAM-like site potential
f(R) = sqrt( 1.0 + sum( exp(-norm(r)) for r in R ) )
# wrap it into a site potential type => can be used as AbstractCalculator
V = ADPotential(f)
# evaluate V and ∇V
R0 = [ @SVector rand(3) for n = 1:nneigs ]
@show V(R0)
@show (@D V(R0))
```## AtomsBase input
```julia
using AtomsBase
using JuLIP
using Unitful# Create AtomsBase system
system = isolated_system([ AtomsBase.Atom(:H, rand(3)*u"pm") for i in 1:10 ])# Convert to JuLIP
at = Atoms(system)
also_at = convert(Atoms, system)#Convert back to AtomsBase
ab = convert(FlexibleSystem, at)
```[build-img]: https://travis-ci.org/libAtoms/JuLIP.jl.svg?branch=master
[build-url]: https://travis-ci.org/libAtoms/JuLIP.jl
[gitter-url]: https://gitter.im/libAtoms/JuLIP.jl
[gitter-img]: https://badges.gitter.im/libAtoms/JuLIP.jl.svg