On Thu, Jun 20, 2013 at 07:57:38PM -0700, Suraj Mirpuri wrote:
> Thanks! I think I can take it from here, but a few more questions, as I
> looked at the OBFit source and I am pretty confused on how it works. Isn't
> there a superimpose method? What is the benefit to qtrfit? Also how do I
> use these in Python? I tried feeding superimpose two obmol objects but it
> apparently requires doubles and a size parameter but it's very unclear why
> or what these are from the documentation. What I want to do is just take
> two molecules and align them on a single fragment, then add a third one on
> top of those. I don't know if this is necessarily simple but it definitely
> seems doable if I just call OBFit using subprocess, but that seems like a
> poor kludge. I just don't want to have to reimplement OBFit in python in my
> little script here because that just seems like overkill, I think I am just
> missing how to use superimpose and qtrfit really...
> 
> Thanks again for your time!
> 
> -- Raj
> 
> 
> On Wed, Jun 19, 2013 at 8:01 PM, Geoffrey Hutchison <
> [email protected]> wrote:
> 
> > > 1. Can I superimpose more than two molecules using OBFit? How would this
> > be done if it is possible?
> >
> > I'm not sure what you mean. The obfit program can take one scaffold and
> > align many molecules in a multi-molecule file.
> >
> > I think you're asking if you can put say 3 fragments all on top of each
> > other. Yes, but you'd have to do it stepwise -- align two, then add the
> > next, etc.
> >
> > > 2. If not, or even if so, how would I superimpose molecules using the
> > OpenBabel base classes and methods, in a program, as opposed to using OBFit
> > externally?
> >
> > The code for obfit is open source. I'd check tools/obfit.cpp:
> > https://github.com/openbabel/openbabel/blob/master/tools/obfit.cpp
> >
> > Hope that helps,
> > -Geoff

Hi!

Sounds like you need OBAlign (Open Babel has to be compiled with
Eigen support enabled). From Python you would use it like this:
import openbabel as ob

a = ob.OBAlign(False, False)
a.SetRefMol(mol1)
a.SetTargetMol(mol2)
a.Align()
a.UpdateCoords(mol2)

And then set the next target molecule and align it. Fore more
details see API documentation.


Reinis

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to