JuLIP.jl

Julia Library for Interatomic Potentials
Author JuliaMolSim
Popularity
49 Stars
Updated Last
1 Year Ago
Started In
June 2016

JuLIP: Julia Library for Interatomic Potentials

Build Status Social
Build Status

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. 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. There are also reverse bindings available via 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 , 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 MolSim registry via

] registry add https://github.com/JuliaMolSim/MolSim.git

Then, to install JuLIP,

] add Pkg.add("JuLIP")

and run

Pkg.test("JuLIP")

to make sure the installation succeeded. If a test fails, please open an issue.

Most likely you will also want to ASE bindings; please see ASE.jl for more detail.

Examples

The following are some minimal examples to just get something to run.

Vacancy in a bulk Si cell

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

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

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))