The easy part is adding the water. The hard part is to put it where you
want.

Given two OBMols, one for the molecule and one for the water, you can just
add them together with mol += watermol. This copies the watermol to the
"end" of mol. All you then need to do is set the x, y and z coordinates of
the atoms of the copied water to wherever you want. (BTW, the mcdlutil
functions are probably related to 2D depiction.)

Regards,
- Noel

On 7 February 2018 at 22:08, CodyA <cral...@umich.edu> wrote:

> Hi I'm wondering if it anyone knows how to add hydrogen-bonding water to
> molecules at specific sites. In addition, it would be useful to distinguish
> whether the water is acting as a H-bond acceptor or H-bond donor.
>
> There are several openbabel cpp functions that seem relevant, especially in
> mcdlutil.cpp:
> addFragment
> addAsTemplate
>
> As their name implies. They add a fragment to a molecule. In this case the
> fragment would be the water.
>
> However, I don't know how to use these functions.
>
>
>
>
>
>
>
>
>
> --
> Sent from: http://forums.openbabel.org/General-discussion-f3090658.html
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to