Giter Club home page Giter Club logo

julip.jl's Introduction

JuLIP: Julia Library for Interatomic Potentials

Build Status Social
GitHub Workflow 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.

Units system

JuLIP follows ASE's unit system, 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

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

AtomsBase input

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)

julip.jl's People

Contributors

casv2 avatar cortner avatar davkovacs avatar femtocleaner[bot] avatar florapoon avatar fredrikekre avatar git4lei avatar jamesgardner1421 avatar jameskermode avatar lzhang2012-sjtu avatar tjjarvinen avatar tkelman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.