Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Dimitri Maziuk
On 10/25/2013 02:11 PM, Igor Filippov wrote:
>> a "molecule" is a thing with atoms and bonds.
> 
> Hmmm, no salts? No organometalics?

I didn't say you have to define "bond" as (e.g.) "peptide-only". As long
as you know something's holding this carbon and this metal more or less
together...

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Igor Filippov
> a "molecule" is a thing with atoms and bonds.

Hmmm, no salts? No organometalics?


On Fri, Oct 25, 2013 at 3:08 PM, Dimitri Maziuk wrote:

> On 10/25/2013 01:48 PM, Geoffrey Hutchison wrote:
> >> (I would naively expect "CC" + "CCO" to produce "" and H2O, but
> >
> > There are obviously multiple possible *chemical* things one could
> imagine. But there’s no way code can or should make assumptions about
> chemical transformations.
>
> It's because my naive idea of a "molecule" is a thing with atoms and
> bonds. So if I define
>  molecule + molecule = molecule
> I expect the result to be a single molecule with a bond where the '+' was.
>
> I.e. I'd expect
> OBMol + OBMol = OBMol to be something that creates a bond whereas
> OBMol + OBMol = (OBMol, OBMol) is a set of disjoint molecules, no
> strings attached.
>
> --
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
>
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Dimitri Maziuk
On 10/25/2013 01:48 PM, Geoffrey Hutchison wrote:
>> (I would naively expect "CC" + "CCO" to produce "" and H2O, but
> 
> There are obviously multiple possible *chemical* things one could
imagine. But there’s no way code can or should make assumptions about
chemical transformations.

It's because my naive idea of a "molecule" is a thing with atoms and
bonds. So if I define
 molecule + molecule = molecule
I expect the result to be a single molecule with a bond where the '+' was.

I.e. I'd expect
OBMol + OBMol = OBMol to be something that creates a bond whereas
OBMol + OBMol = (OBMol, OBMol) is a set of disjoint molecules, no
strings attached.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Geoffrey Hutchison
> (I would naively expect "CC" + "CCO" to produce "" and H2O, but

There are obviously multiple possible *chemical* things one could imagine. But 
there’s no way code can or should make assumptions about chemical 
transformations.

We do have a chemical transformation class for handling reactions/modifications.

-Geoff


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Dimitri Maziuk
On 10/25/2013 01:15 PM, Fredrik Wallner wrote:
> Well, I was referring to the fact that
> a += b won't work, but a.OBMol += b.OBMol will. That isn't intuitive to me...

Ah. Yes, pybel should override the __add__().

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Fredrik Wallner
Well, I was referring to the fact that
a += b won't work, but a.OBMol += b.OBMol will. That isn't intuitive to me...

/Fredrik

Skickat från min iPhone

> 25 okt 2013 kl. 16:46 skrev Dimitri Maziuk :
> 
>> On 2013-10-25 04:33, Fredrik Wallner wrote:
>> Hi,
>> 
>> Wouldn't this be good to have exposed directly in pybel? Seems a bit 
>> non-intuitive to have to add the OBMols…
> 
> To a programmer it's plenty intuitive. What's not intuitive to this 
> programmer is if a and b have more than one possible binding site, how 
> does it pick one.
> 
> Dima
> 
> 
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Dimitri Maziuk
On 10/25/2013 11:55 AM, Dimitri Maziuk wrote:
> On 10/25/2013 10:11 AM, Igor Filippov wrote:
>> I don't think it does.
>> I could be wrong but I think one has to create a bond from somewhere in
>> mol1 to somewhere in mol2 explicitly.
> 
> Now if "+" doesn't actually do anything useful unless you first (e.g.)
> a.lose( "H12" ), b.lose( "O1H1" ), then I agree: "a + b" is not very
> intuitive.

Actually, after looking at Noel's example I see that it doesn't join
them, it just draws them side-by-side. So forget I said anything.

(I would naively expect "CC" + "CCO" to produce "" and H2O, but
IANAChemist.)
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Dimitri Maziuk
On 10/25/2013 10:11 AM, Igor Filippov wrote:
> I don't think it does.
> I could be wrong but I think one has to create a bond from somewhere in
> mol1 to somewhere in mol2 explicitly.

Now if "+" doesn't actually do anything useful unless you first (e.g.)
a.lose( "H12" ), b.lose( "O1H1" ), then I agree: "a + b" is not very
intuitive.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Igor Filippov
I don't think it does.
I could be wrong but I think one has to create a bond from somewhere in
mol1 to somewhere in mol2 explicitly.

Igor


On Fri, Oct 25, 2013 at 10:46 AM, Dimitri Maziuk wrote:

> On 2013-10-25 04:33, Fredrik Wallner wrote:
> > Hi,
> >
> > Wouldn't this be good to have exposed directly in pybel? Seems a bit
> non-intuitive to have to add the OBMols…
>
> To a programmer it's plenty intuitive. What's not intuitive to this
> programmer is if a and b have more than one possible binding site, how
> does it pick one.
>
> Dima
>
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Dimitri Maziuk
On 2013-10-25 04:33, Fredrik Wallner wrote:
> Hi,
>
> Wouldn't this be good to have exposed directly in pybel? Seems a bit 
> non-intuitive to have to add the OBMols…

To a programmer it's plenty intuitive. What's not intuitive to this 
programmer is if a and b have more than one possible binding site, how 
does it pick one.

Dima


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Fredrik Wallner
Hi,

Wouldn't this be good to have exposed directly in pybel? Seems a bit 
non-intuitive to have to add the OBMols…

Kind regards,
Fredrik

25 okt 2013 kl. 11:28 skrev "Noel O'Boyle" :

> Maciek hit send before I did :-)
> 
> a = pybel.readstring("smi", "CC")
> b = pybel.readstring("smi", "CCO")
> a.OBMol += b.OBMol
> print a.write("smi")
> ...gives...
> CC.CCO
> 
> On 25 October 2013 10:11, Zhengyh  wrote:
>> Hello,
>> 
>> Thank you all who are helping me with this openbabel.
>> We use --join to join all input molecules into a single output
>> moleculeentry.
>> But which is the right function to do this in the pybel or openbable API?
>> I just can't find it...
>> 
>> Regards!
>> 
>> 
>> --
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> ___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Noel O'Boyle
Maciek hit send before I did :-)

a = pybel.readstring("smi", "CC")
b = pybel.readstring("smi", "CCO")
a.OBMol += b.OBMol
print a.write("smi")
...gives...
CC.CCO

On 25 October 2013 10:11, Zhengyh  wrote:
> Hello,
>
> Thank you all who are helping me with this openbabel.
> We use --join to join all input molecules into a single output
> moleculeentry.
> But which is the right function to do this in the pybel or openbable API?
> I just can't find it...
>
> Regards!
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Maciek Wójcikowski
Hi,

Have you tried mol1 += mol2? I use it for joining proteins with ligands,
but should work in any case.


Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl


2013/10/25 Zhengyh 

> Hello,
>
> Thank you all who are helping me with this openbabel.
> We use --join to join all input molecules into a single output
> moleculeentry.
> But which is the right function to do this in the pybel or openbable API?
> I just can't find it...
>
> Regards!
>
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


[Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Zhengyh
Hello,

Thank you all who are helping me with this openbabel.
We use --join to join all input molecules into a single output
moleculeentry.
But which is the right function to do this in the pybel or openbable API?
I just can't find it...

Regards!


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss