How to Add a New Capping Method
Where do I Put a New Capping Method?
C++
C++ capping methods live in src/ghostfragment/capping
. Each capping method
should be implemented as a module (TODO: link to PluginPlay module). The name
of the module should reflect the algorithm in the module. For example the
SingleAtom
module uses a single atom to cap all bonds. It is common C++
practice to name the source file based on the algorithm within it. So, the
SingleAtom
module lives in src/ghostfragment/capping/single_atom.cpp
.
How do I Implement a New Capping Method?
C++
Once you know the name for module, add a corresponding
DECLARE_MODULE
statement tosrc/ghostfragment/capping/capping.hpp
Update
load_modules
insrc/ghostfragment/capping/capping.hpp
so that it loads your module.If applicable, modify
set_defaults
insrc/ghostfragment/capping.hpp
so that it sets the default submodules for your new module.In
src/ghostfragment/capping/name_of_your_module.cpp
create a new module satisfying the property typeCapped<T>
.