Using the Energy Computation Plug-In
In ProteinShop the user control energy computations via the Energy
Visualization Dialog. The dialog becomes active when the user
loads a PDB file that satisfies the format
requirements of the Amber plug-in.
ProteinShop will automatically update the current protein's energy after each
manipulation operation.
As soon as energy computation is complete, ProteinShop will display
the computation result in the Energy
Visualization Dialog, and it will update the current rendering if
energy visualization has been enabled.
To visualize the per-atom partial energies, the Energy
Visualization Dialog can be used to color-code atoms' van-der-Waals
spheres according to the selected settings. The "Energy Mapping Range"
text fields define the minimum and maximum per-atom energy values that
will be mapped to ProteinShop's green-yellow-red color ramp, and the
toggle buttons in the "Visualized Energy Components" group allow
selecting any combination of energy components to be visualized. Any
changes in the toggles, or in the mapping range, result in immediate
visualization of the results.
The minimization button in
the Energy
Visualization Dialog allows the user to
initiate, pause, and continue a local minimization computation.
The function
minimized in each case consists of the energy components selected by
the user via the toggle buttons in the Energy
Visualization Dialog window.
Defining an external energy computation module
ProteinShop includes an Amber plug-in as the standard energy module,
but
users may prefer to use their own energy modules.
In order to interface with ProteinShop, an "energy computation module"
must have the following properties:
- The module must be able to fully initialize its computation from
reading a PDB file. In other words, it must be able to generate all
internal data structures it needs to perform its computation by parsing
a protein structure.
- The module must be able to update its internal data structures to
perform its computation on different conformations of the same protein
from only a vector of 3D cartesian atom coordinates defining the
current conformation.
- The module must return a single value.
The reasons for these requirements are mostly technical. When a new
protein is created, either from reading a prediction file or a PDB
file, ProteinShop creates a temporary PDB file containing the new
protein structure, and passes the name of this file to the computation
module for initialization. When a user later requests calculating the
(energy) value of the current protein, ProteinShop only sends an array
of current atom positions to the computation module, and expects a
single return value.
Loading a different energy module
ProteinShop provides a plug-in system that allows dynamically loading
energy computation modules at program start-up. To use an existing
computation module, it first has to be wrapped into an interface layer
that allows dynamic linking and understands ProteinShop's energy API.
Once a computation
module is available in the correct form, it can be loaded by listing
its name in ProteinShop's configuration file ("ProteinShop.cfg").
For example, to load a computation module compiled
into a dynamic library libAmber.so, ProteinShop.cfg would have to contain
the following lines:
Section EnergyCalculator
addCaps true
enginePath lib
dsoName lib/libAmber.so
EndSection
These lines must exist at the root level of the file, i.e., not inside
any other Section/Endsection brackets. If a dsoName line is present
inside the EnergyCalculator section, ProteinShop will try loading a
dynamic library of the given name at startup. If loading of this
library fails, ProteinShop will display an error message and continue
with energy calculation functionality disabled. To get rid of such an
error message, one has to remove or comment out the lines.