- 
                Notifications
    
You must be signed in to change notification settings  - Fork 34
 
AddHydrogensToLigand
        dstoeckel edited this page Feb 20, 2015 
        ·
        2 revisions
      
    The following example shows how to add hydrogens if bond orders are valid.
#include <BALL/KERNEL/system.h>
#include <BALL/KERNEL/atom.h>
#include <BALL/MATHS/vector3.h>
#include <BALL/QSAR/ringPerceptionProcessor.h>
#include <BALL/STRUCTURE/addHydrogenProcessor.h>
System* system;
...
// compute all rings
RingPerceptionProcessor rpp;
vector<vector<Atom*> > rings;
// compute all smallest rings
rpp.calculateSSSR(rings, *system);
rings = rpp.getAllSmallRings();
// add hydrogens
AddHydrogenProcessor ahp;
ahp.setRings(rings);
system->apply(ahp);