-
Notifications
You must be signed in to change notification settings - Fork 3
Architecture
The basic concepts of TMol's architecture are:
- The PoseStack - This is a collection of Poses (structures) that are the focus of the work that
tmol
will be performing. - The ScoreFunction - A function that will evaluate a PoseStack with one or more ScoreTerms.
- The Minimizer - A gradient-descent algorithm that modifies degrees-of-freedom of a PoseStack to minimize the value of a ScoreFunction.
The tmol
database defines chemical block types, patches, and score term data.
tmol
comes bundled with a default database that includes the base amino acids and cterm and nterm variant patches.
tmol
is primarily written in Python, with C++/CUDA being used to write optimized low level code for specific operations (most EnergyTerms, for example). C++ functions are exported to Python by pybind
.
When C++/CUDA is used, both a CPU and a CUDA version are compiled. This compilation is done Just-In-Time (JIT) by Ninja
when used. tmol
makes use of a 'diamond' structure to share the implementation code between C++/CUDA. Note that this means implementation code may only use functions that are available both in C++17 and CUDA (critically, things like std::cout
are missing).
Warning
There is currently a bug in the CUDA compilation where the JIT compiling may fail to recognize updates to the code. If you notice a difference between the behavior of your C++ and CUDA implementations, you may need to delete the local cached object files to force a recompile.