So far, I have only seen Chemfiles, which has Julia bindings but is missing important features like a powerful atom selection language. For example, Chemfiles cannot easily select the set of atoms X far away from another selection. It would be great to have that feature and more included and not to have to reimplement them in Julia. Libraries like MDAnalysis do this for Python. What is your favorite Julia tool? I know about PyCall but there is a significant performance penalty which is an issue for me. I want to switch some code to Julia, but this gap keeps me in Python land.
I may be biased, but I think the best right now is BioStructures.jl.
It has spatial calculations such as distances, angles, torsions, superimpositions, contact graphs and RMSD. It has an atom selection interface.
It can’t currently read trajectory and topology files of the MD variety, but if you use Chemfiles.jl to convert these to PDB it can read those in quickly. I would of course be interested to receive contributions in this area if you want to make the library more suitable for MD analysis.
Other tools you might find useful include:
- MDToolbox.jl - a Julia toolbox for statistical analysis of molecular dynamics trajectories.
- Molly.jl - proof-of-concept MD in Julia with some plotting/animation examples in the docs.
- NBodySimulator.jl - a simulator for N-body problems, including astrophysical and molecular dynamics.
- ProteinEnsembles.jl - has some ensemble analysis code, e.g. PCA.
- Bio3DView.jl - view molecular structures in Julia.
Thanks! One more question: do any of these libraries facilitate frame-by-frame reading of trajectory files, like MDAnalysis’s
"
for ts in universe.trajectory:
# code, code, code
"
This is required for processing trajectory size > memory. Splitting up trajectories before a calculation is time-consuming and inconvenient. Can frame-by-frame reading be done easily in one of the above libraries?
If it was in one of them it would be in Chemfiles, see for instance Chemfiles.jl/Trajectory.jl at master · chemfiles/Chemfiles.jl · GitHub.
Hey, chemfiles author here. Happy to see my code is being considered for your use case!
For example, Chemfiles cannot easily select the set of atoms X far away from another selection.
Not sure what you want to do, something like “I want all atoms at least 10A from any atom in name O
”? This is something that we could add to chemfiles pretty easily if there is a demand for it =). Anyway, do not hesitate opening issues or coming to the gitter channel to discuss!
Yes, I meant something like what you said, something to select, for example, all residues named “HOH” within X angstroms of ANY residues of names Y Z etc. MDAnalysis has this and several similar options (3. Selection commands — MDAnalysis 2.3.0 documentation). It would be great if chemfiles could do this.
I agree this would be very nice to have. I’ve opened an issue to track this