On 26/02/2012 16:19, Noel O'Boyle wrote:
> I've been looking at the opalign which I really like. There's one
> issue remaining which I can't quite decide how to handle.
>
> Basically, if you use --align -s "substructure color" -O myfile.svg
> and your input structure is 2D everything is fine. However, if your
> input structure is 3D, it does a 3D alignment, but the resulting SVG
> is not aligned.
>
> To get around this, I'm thinking that the op should check the output
> format: if it's SVG or PNG(2) then it should align on 2D. Or is this
> just a whole can of worms, and a Bad Idea? Maybe there should be a
> separate align2d and align3d and leave it to the user to explicitly
> save what s/he wants?

I agree with your proposal. Is displaying in 2D after 3D alignment ever 
any use? Since the image formats automatically* give the molecules 2D 
coordinates without asking, it would be consistent to do the alignment 
in 2D also without asking. OpAlign already generates coordinates if the 
molecule is 0D.
* subject to the (undocumented) -xy and -xn options

Maybe there could be an extra OBFormat flag which would be set in 2D 
depiction formats. This would help to maintain their status as plugins.

I think there might be some complications when implementing this, which 
I might be able to help with.

Chris


------------------------------------------------------------------------------
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-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to