Skip to content
Raúl Mera A edited this page Mar 21, 2024 · 38 revisions

chemistry gopher

goChem is an open source library for chemistry, with some emphasis on computational biochemistry, written in the Go programing language.

Current capabilities

  1. Reads/writes PDB, GRO, and XYZ files.

  2. Reads XTC, DCD trajectory files, both sequentially and concurrently.

  3. Reads CDR (old AMBER format, used by pDynamo) trajectory files sequentially.

  4. Superimposes molecules (especially adequate for non-proteins since
    doesn't use sequence information). The user specifies what atoms from each molecule are to be use for the superimposing transformation calculation. Then all the atoms will be superimposed accordingly. This means that non-identical molecules can be superimposed.

  5. Calculates RMSD between sets of coordinates.

  6. Allows to select atoms and coordinates by using a go slice of indexes.

  7. Allows to replace selected coordinates for a new set.

  8. Calculates moment tensor and ellipsoid of inertia-related properties

  9. The Molecule object implements the sort.Interface interface, so atoms can easily be sorted by b-factors.

  10. Several Axis manipulation.

    • Align a vector with the Z axis.
    • Rotate around the Z axis until the xy projection of a vector becomes the Y axis.
    • Rotate a sub-group of atoms in a molecule using any 2 coordinates as the rotation axis.

    Rotations are implemented using Geometric (Clifford) algebra. The Clifford algebra implementation is concurrent. In general, Clifford algebra is mathematically better behaving than Euler angles, which are not defined for certain rotations.

  11. Implements the LOVO algorithm to estimate most rigid atoms in a trajectory (10.1371/journal.pone.0119264)

  12. Auto-detects bonds, and implements graph-based algorithms for their analysis.

  13. Obtains time-correlation functions.

  14. Calculates and draws Ramachandran plots for an aminoacidic chain or a subset of it.

  15. Implement absolute-differences-histogram analysis functions (10.1021/acs.jpclett.9b02868)

  16. Implements several solvation-analysis functions, from simple cutoff-based analysis to RDF and its generalization, the MDDF (10.1063/1.2426346)

  17. Generates input for, runs and recovers results from QM calculations with Orca, NWChem, MOPAC and xtb (which must be obtained independently from their respective distributors). Interfacing goChem to other QM codes is fairly simple.

  18. Implements a JSON interface that allows easy communication of goChem programs with Python scripts via UNIX pipes. This allows the use of goChem for writing PyMOL plugins (see the goPyMOL repo).

Installation

goChem uses Go modules, so you can use it in your program by simply adding the relevant parts to the go.mod file and letting go tidy take care of the installation.

Documentation

The User's guide is a work in progress. It contains some explanations and examples.

The types, functions, etc. of gochem can be found in the corresponding GoDoc page:

Gochem at GoDoc

Examples

A few practical examples of goChem's usage.

Moment tensor analyses.

Geometry manipulation and QM input building.

Aligning a given plane with the XY plane.

Authors and ackowledgements

The goChem lead developer is Prof. Raúl Mera Adasme, at University of Tarapaca, Chile.

goChem contains contributions from Dr. Janne Pesonen (math for the Geometric Algebra rotations) Prof. Verónica Jimenez C. (superposition function).

Helpful advice from Prof. Dage Sundholm is gratefully acknowledged.

The developer dedicates his effort to the long life of the Ven. Khenpo Phuntzok Tenzin Rinpoche.

Disclaimer

Copyright 2012-2024 Raúl Mera Adasme.

The code in this wiki, is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

The code in this wiki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See http://www.gnu.org/licenses/ for more information.

The goChem mascot is a modification by Sebastian Franchini of the Go programming language mascot, by Renée French.