This is a package written in Julia. We invite you to experiment with the language, but if you want to just call this package from Python, read the From Python section of the manual. Understanding all the features of the package requires reading the manual as whole. The syntaxes of using this package from Julia or Python are almost identical, and the motivation for using Python should be mostly the familiarity with further analsys tools, as the plotting packages.
First you need to install the Julia language in your platform, from: http://julialang.org. Julia version 1.6 or greater is required. Using the juliaup tool is also a highly recommended way of installing and keeping Julia up to date.
New to Julia? Julia is a modern high-level yet performant programming language. Some tips and a nice workflow for using it effectively can be found here.
For this specific package, following a the step-by-step examples provided here after installing Julia should be enough.
Within Julia, to install the packages required for running the examples here you need to do:
julia> import Pkg julia> Pkg.add(["ComplexMixtures","Plots","PDBTools"])
Please read the recommended workflow below, for further information and to be sure to have a smoother experience.
Once Julia is installed, we recommend to create an environment that will contain all the packages you may use for your analyses, including
ComplexMixtures, in such a way that your results can always be reproduced and you don't get any version incompatibility.
We illustrate this by creating the "MyNewPaper" environment, which will be hosted in a simple directory,
Then, start Julia and activate the environment that will be hosted there:
julia> import Pkg; Pkg.activate("/home/user/Documents/MyNewPaper") Activating new project at `~/Documents/MyNewPaper`
and add to this environment the packages that your analyses will require:
That's it. Close Julia. Note that this created the files
Project.toml in the
MyNewPaper directory, which contain the information of packages and exact package versions you are using now on in this environment. Saving these files may be relevant for the future exact reproduction of your analyses.
Now, your analysis scripts, described in the next section in details, will look like:
import Pkg; Pkg.activate("/home/user/Documents/MyNewPaper") using ComplexMixtures using PDBTools using Plots # etc ...
And the script can be run with
julia -t auto script.jl (where
-t auto allows for multi-threading), or included in julia with
julia> include("./scritp.jl"), as described in the next section.
By loading the package with
the most common functions of the package become readily available by their direct name, for example
If you don't want to bring the functions into the scope of your script, use
Then, the functions of the package are called, for example, using
ComplexMixtures.mddf(...). To avoid having to write
ComplexMixtures all the time, define an accronym. For example:
import ComplexMixtures as CM CM.mddf(...)