Hi Florian,

Good to meet you at Goslar.

You can access the spectrophore from Python as follows:

>>> import pybel
>>> spectromaker = pybel.ob.OBSpectrophore()
>>> mol = pybel.readstring("smi", "CCC(=O)Cl")
>>> mol.make3D()
>>> myspec = spectromaker.GetSpectrophore(mol.OBMol)
>>> print myspec
(1.9188820873264936, 1.3779850156141404, 1.6545133998665147, 4.223289590168287,
7.0393209939670101, 6.9526389819350349, 5.0181681207236251, 5.1643466127719195,
5.59340805409634, 8.345298919520646, 9.7302501926297307, 5.420193132509139, 2.65
89584250555993, 4.2305867338533503, 5.2040184695128362, 7.3529734782986313, 8.43
16917599250072, 10.56621427956005, 5.5603086090040872, 9.0161014657760621, 10.21
3590898162922, 10.556235776440086, 12.699924307275969, 8.3723611206701829, 6.555
0897240361765, 12.196124593591096, 11.149397464069917, 25.575659087717039, 29.86
9553579053754, 33.025183660115289, 23.489782781676645, 16.246285821014279, 26.17
6007787036561, 36.740589304516156, 43.705358401245142, 28.046290240485249, 0.547
30055623006191, 0.89174725011169631, 2.1830656346397137, 2.194336074284025, 0.99
119077568489211, 1.2875748624433234, 0.76040377919922997, 2.4829098627372299, 2.
3394221112921088, 1.4695456992744806, 1.5850520074712673, 2.0654417047802762)
>>>

For information on what all of these numbers are, see the API documentation at:
http://openbabel.org/api/2.3/classOpenBabel_1_1OBSpectrophore.shtml

With this, you should be able to iterate over all of the molecules in
a file, and calculate the spectrophore for each.

- Noel

On 10 November 2010 10:23, Florian Kölling <florian.koell...@tu-bs.de> wrote:
> Hi Folks,
>
> I wanted to start working with the new OB Spectrophore Class (ideally
> using python).
> Currently, I'm doing so using an os.system call:
>
> obspectrophore = "/usr/local/bin/obspectrophore"
> template_call = "obspectrophore +' -i  1eve_ligand.mol  > template.txt"
> os.system(template_call)
>
> My Questions:
> 1) Is there a more convenient way to get an output file than the
> '>template.txt' option?
>
> 2) How can I handle (large) multi conformational sdf files? Just doing
> the same way as mentioned above? I tried but stopped after quite a long
> time (inefficient?!) -- Can I read in the sdf file via pybel and iterate
> over every molecule separately and create the spectrophores?
>
> Thanks and best regards,
>
> flo
>
> --
> --------------------------------------
> Florian Koelling
> Institut fuer Pharmazeutische Chemie
> AK Baumann - Molecular Modelling Group
> Technische Universitaet Braunschweig
> Beethovenstrasse 55
> D-38106 Braunschweig
> Tel.: ++49 531 391-8451
> florian.koell...@tu-braunschweig.de
> --------------------------------------
>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to