Dear OpenBabel developers,

what about adding to OpenBabel the AddNonPolarH(), DelPolarH() and DelNonPolarH() functions, in addition to the already existing AddPolarH()? They are very useful, for instance, to deprotonate/reprotonate ligand poses before/after docking with a united-atom docking engine such as AutoDock. I have prepared a patch (attached) against the latest 4710 SVN build, which adds the functions and makes them available from the command line with the --AddNonPolarH, --DelPolarH and --DelNonPolarH switches. I implemented AddNonPolarH() in the less painful way that came to my mind; namely, I changed the prototype of the first argument of AddHydrogens() from bool to int. Once, "false" meant add all hydrogens, and "true" meant add only polar hydrogens. Now, 0 means add all hydrogens, 1 means add only polar hydrogens, and -1 means add only nonpolar hydrogens. This should avoid breaking existing software calling AddHydrogens() directly instead of using AddPolarHydrogens(). Additionally, I have added a AddNonPolarHydrogens() function specular to AddPolarHydrogens(). If you approve the patch I volunteer to update also perl, ruby, python and csharp bindings accordingly; however I noticed they are not in the SVN trunk, should I copy them from the 2.3.1 release?

The patch can be applied the patch from the OpenBabel root dir with

$ patch -p1 < /path/to/openbabel_add_del_hydrogen.patch

Cheers,
Paolo

--
==========================================================
Paolo Tosco, Ph.D.                Phone: +39 011 6707680
Department of Drug Science        Fax:   +39 011 6707687
and Technology                    Mob:   +39 348 5537206
Via Pietro Giuria, 9
10125 Torino, Italy
                                  http://open3dalign.org
E-mail: paolo.to...@unito.it      http://open3dqsar.org
==========================================================

Attachment: openbabel_add_del_hydrogen.patch.gz
Description: GNU Zip compressed data

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to