This package provides utilities to build atomic structures. At the moment the functionality is limited - see examples below. The intention is that over time this package becomes the de facto standard for generating structures in the JuliaMolSim ecosystem. Contributions are very welcome.
Currently there are just two exported functions to build materials:
bulk
rattle!
In addition we overloadrepeat
(with alias*
)
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.
PubChem interface allows you to download structures from PubChem.
This is done with load_from_pubchem
function. You can only load isolated molecules currently.
using AtomsBuilder
# using trivial name
load_from_pubchem( "water" )
# using CID
load_from_pubchem( 887 )
# using SMILES
load_from_pubchem( smiles="CC(=O)C" )
# using CAS number
load_from_pubchem( "64-17-5" )
The the package started as 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. There are almost certainly more general and more elegant implementations of structure building available than what we currently. Some packages that contain overlapping functionalities that could replace or add to AtomsBuilder.jl
include