Installation Guide

Here are the installation instructions for package Crystallography. If you have trouble installing it, please refer to our Troubleshooting page for more information.

Install Julia

First, you should install Julia. We recommend downloading it from its official website. Please follow the detailed instructions on its website if you have to build Julia from source. Some computing centers provide preinstalled Julia. Please contact your administrator for more information in that case. Here's some additional information on how to set up Julia on HPC clusters.

If you have Homebrew installed, open the Terminal app and type

brew install julia

to install it as a formula.

If you are also using macOS and want to install it as a prebuilt binary app, type

brew install --cask julia

instead.

If you want to install multiple Julia versions in the same operating system, a recommended way is to use a version manager such as Juliaup. First, install Juliaup. Then, run

juliaup add release
juliaup default release

to configure the julia command to start the latest stable version of Julia (this is also the default value).

Here is a short video introduction to Juliaup made by its authors.

Which version should I pick?

You can install the current stable release or the long-term support (LTS) release.

  • The current stable release is the latest release of Julia. It has access to newer features, and is likely faster.
  • The long-term support release is an older version of Julia that has continued to receive bug and security fixes. However, it may not have the latest features or performance improvements.

For most users, you should install the current stable release, and whenever Julia releases a new version of the current stable release, you should update your version of Julia. Note that any code you write on one version of the current stable release will continue to work on all subsequent releases.

For users in restricted software environments (e.g., your enterprise IT controls what software you can install), you may be better off installing the long-term support release because you will not have to update Julia as frequently.

Versions above v1.3, especially the latest stable ones, are strongly recommended. This package is highly unlikely to work on v1.0 and earlier versions. Since the Julia team has set v1.6 as the LTS release, we will gradually drop support for versions below v1.6.

Julia and Julia packages support multiple operating systems and CPU architectures; check this table to see if it can be installed on your machine. For Mac computers with M-series processors, this package and its dependencies may not work. Please install the Intel-compatible version of Julia (for macOS x86-64) if any platform-related error occurs.

Install the package

Now I am using macOS as a standard platform to explain the following steps:

  1. Open the Terminal app, and type julia to start an interactive session (known as the REPL).

  2. Run the following commands and wait for them to finish:

    julia> using Pkg
    
    julia> Pkg.update()
    
    julia> Pkg.add("Crystallography")
  3. Run

    julia> using Crystallography

    and have fun!

  4. Please keep the Julia session active while using it. Restarting the session may take some time.

If you want to install the latest in-development (probably buggy) version of Crystallography, type

julia> using Pkg
julia> Pkg.update() Updating registry at `~/.julia/registries/General.toml` No Changes to `~/work/Crystallography.jl/Crystallography.jl/docs/Project.toml` No Changes to `~/work/Crystallography.jl/Crystallography.jl/docs/Manifest.toml`
julia> pkg"add https://github.com/MineralsCloud/Crystallography.jl"┌ Warning: The Pkg REPL mode is intended for interactive use only, and should not be used from scripts. It is recommended to use the functional API instead. └ @ Pkg.REPLMode /opt/hostedtoolcache/julia/1.9.2/x64/share/julia/stdlib/v1.9/Pkg/src/REPLMode/REPLMode.jl:382 Cloning git-repo `https://github.com/MineralsCloud/Crystallography.jl` Updating git-repo `https://github.com/MineralsCloud/Crystallography.jl` Resolving package versions... Updating `~/work/Crystallography.jl/Crystallography.jl/docs/Project.toml` [3bff3928] ~ Crystallography v0.6.0 ⇒ v0.6.0 `https://github.com/MineralsCloud/Crystallography.jl#main` Updating `~/work/Crystallography.jl/Crystallography.jl/docs/Manifest.toml` [a8cc5b0e] + Crayons v4.1.1 [6007d9b0] + CrystalInfoFramework v0.6.0 [3bff3928] ~ Crystallography v0.6.0 ⇒ v0.6.0 `https://github.com/MineralsCloud/Crystallography.jl#main` [9a962f9c] + DataAPI v1.15.0 [a93c6f00] + DataFrames v1.6.1 [864edb3b] + DataStructures v0.18.15 [e2d170a0] + DataValueInterfaces v1.0.0 [8fc22ac5] + FilePaths v0.8.3 [48062228] + FilePathsBase v0.9.20 [842dd82b] + InlineStrings v1.4.0 [41ab1584] + InvertedIndices v1.3.0 [82899510] + IteratorInterfaceExtensions v1.0.0 [692b3bcd] + JLLWrappers v1.5.0 [b964fa9f] + LaTeXStrings v1.3.0 [d42ef402] + Lerche v0.5.4 [1914dd2f] + MacroTools v0.5.10 [e1d29d7a] + Missings v1.1.0 [bac558e1] + OrderedCollections v1.6.2 [2dfb63ee] + PooledArrays v1.4.2 [08abe8d2] + PrettyTables v2.2.7 [189a3867] + Reexport v1.2.2 [ae029012] + Requires v1.3.0 [91c51154] + SentinelArrays v1.4.0 [a2af1166] + SortingAlgorithms v1.1.1 [f761d5c5] + Spglib v0.8.0 [892a3eda] + StringManipulation v0.3.0 [3783bdb8] + TableTraits v1.0.1 [bd369af6] + Tables v1.10.1 [30578b45] + URIParser v0.4.1 [a51ab1cf] + ICU_jll v69.1.0+0 [1d63c593] + LLVMOpenMP_jll v15.0.4+0 [76ed43ae] + SQLite_jll v3.42.0+0 [6fcef0ae] + cif_api_jll v0.4.2+0 [ac4a9f1e] + spglib_jll v2.0.2+0 [0dad84c5] + ArgTools v1.1.1 [f43a241f] + Downloads v1.6.0 [7b1f6079] + FileWatching [9fa8497b] + Future [b27032c2] + LibCURL v0.6.3 [44cfe95a] + Pkg v1.9.2 [2f01184e] + SparseArrays [10745b16] + Statistics v1.9.0 [a4e569a6] + Tar v1.10.0 [deac9b47] + LibCURL_jll v7.84.0+0 [29816b5a] + LibSSH2_jll v1.10.2+0 [c8ffd9c3] + MbedTLS_jll v2.28.2+0 [14a3606d] + MozillaCACerts_jll v2022.10.11 [bea87d4a] + SuiteSparse_jll v5.10.1+6 [83775a58] + Zlib_jll v1.2.13+0 [8e850ede] + nghttp2_jll v1.48.0+0 [3f19e933] + p7zip_jll v17.4.0+0 Precompiling project... Crystallography 1 dependency successfully precompiled in 5 seconds. 61 already precompiled. 1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version

in the second step above.

Update the package

Please watch our GitHub repository for new releases. Once we release a new version, you can update Crystallography by typing

julia> using Pkg
julia> Pkg.update("Crystallography") Updating registry at `~/.julia/registries/General.toml` Updating git-repo `https://github.com/MineralsCloud/Crystallography.jl` No Changes to `~/work/Crystallography.jl/Crystallography.jl/docs/Project.toml` No Changes to `~/work/Crystallography.jl/Crystallography.jl/docs/Manifest.toml`
julia> Pkg.gc() Active manifest files: 3 found Active artifact files: 5 found Active scratchspaces: 0 found Deleted no artifacts, repos, packages or scratchspaces

in the Julia REPL.

Uninstall and then reinstall the package

Sometimes errors may occur if the package is not properly installed. In this case, you may want to uninstall and reinstall the package. Here is how to do that:

  1. To uninstall, in a Julia session, run

    julia> using Pkg
    
    julia> Pkg.rm("Crystallography")
    
    julia> Pkg.gc()
  2. Press Ctrl+D to quit the current session. Start a new Julia session and reinstall Crystallography.