Geometry

2 views
Skip to first unread message

Boyang

unread,
Dec 11, 2008, 8:22:40 PM12/11/08
to mx-java
Hi Rich,

1) I wonder whether geometric data could implemented. For example,
bond and torsion angle. The function Bond.getStereo() seems to be a
tentative implementation, but I think, right now it only returns the
value you input when creating a new bond through Molecule.connect().

2) What about error corrections? See the following code. As far as I
understand, I just made something like a cyclohexene with a double
bond from the first and a triple bond from the second C to an C, which
is a bit weird.

Molecule alkane = Molecules.createHexane();
alkane.addAtom("C");
alkane.connect(alkane.getAtom(5), alkane.getAtom(6), 3, 4);
alkane.connect(alkane.getAtom(0), alkane.getAtom(6), 2);
alkane.connect(alkane.getAtom(0), alkane.getAtom(2), 2);
System.out.println(alkane.countAtoms());
System.out.println(alkane.countBonds());
System.out.println(alkane.getBond(5).getStereo());
System.out.println(alkane.getAtom(6).getValence());


3) Why does Atom.getValence() return 5 for a triple bond?

MX is a good toolkit. Thanks for the effort.
Newbie, so please no offense for ignorance.

Keep up the good spirit,
Boyang

rapodaca

unread,
Dec 12, 2008, 12:55:16 AM12/12/08
to mx-java
On Dec 11, 5:22 pm, Boyang <boyang....@gmail.com> wrote:
> Hi Rich,
>
> 1) I wonder whether geometric data could implemented. For example,
> bond and torsion angle. The function Bond.getStereo() seems to be a
> tentative implementation, but I think, right now it only returns the
> value you input when creating a new bond through Molecule.connect().

Hello Boyang, thanks for the comments.

Interesting idea. What kind of geometric data would you want to use?
Bond.getStereo follows the conventions for bond stereo set out in the
V2000 molfile spec from MDL. The similarity was planned - MX should
read and write molfiles quickly.

I'm open to other ideas, though.

> 2) What about error corrections? See the following code. As far as I
> understand, I just made something like a cyclohexene with a double
> bond from the first and a triple bond from the second C to an C, which
> is a bit weird.
>
>         Molecule alkane = Molecules.createHexane();
>         alkane.addAtom("C");
>         alkane.connect(alkane.getAtom(5), alkane.getAtom(6), 3, 4);
>         alkane.connect(alkane.getAtom(0), alkane.getAtom(6), 2);
>         alkane.connect(alkane.getAtom(0), alkane.getAtom(2), 2);
>         System.out.println(alkane.countAtoms());
>         System.out.println(alkane.countBonds());
>         System.out.println(alkane.getBond(5).getStereo());
>         System.out.println(alkane.getAtom(6).getValence());

Error checking (in the form of throwing runtime exceptions, for
example) for valence errors was not part of the original MX design.
One reason was that MX was factored out of ChemWriter, a 2-D structure
editor in which a user may need to make hypervalent atoms on the way
toward drawing their target structure.

Another reason was to enable MX to load molfiles as quickly as
possible. It's assumed that the molfile was encoded properly.

It would not be hard to implement a separate valency checker, though.

> 3) Why does Atom.getValence() return 5 for a triple bond?

Hmm, not sure I follow. Are you referring to question (2) above? If
so, the valence calculator won't work because the molecule has broken
too many valency rules.

For example, from JRuby:

import com.metamolecular.mx.model.DefaultMolecule

m=DefaultMolecule.new
a0=m.add_atom "C"
a1=m.add_atom "C"
m.connect(a0, a1, 3) # at this point, acetylene

a0.getValence # => 3

Boyang Xia

unread,
Dec 13, 2008, 8:07:20 AM12/13/08
to mx-...@googlegroups.com
I am an undergraduate writing a report on de novo ligand binding. Thus I started doing all the research and came across your programme. I have to find more about my subject to offer some better suggestions.

Apart from 3D structures (what I guess -- after reading Wikipedia -- molfiles is for) I would suggest scoring functing and statistical functions (like occurance of certain substructures within the database). But again, maybe that is not within the scope of MX.

Cheers,
Boyang


2008/12/12 rapodaca <rich.a...@gmail.com>



--
You can save many tree babies and tree moms by not printing this email. If you have to, do so efficiently and click on the print button provided by the webmail apps (if applicable).

rapodaca

unread,
Dec 13, 2008, 10:32:42 AM12/13/08
to mx-java
On Dec 13, 5:07 am, "Boyang Xia" <boyang....@gmail.com> wrote:
> Apart from 3D structures (what I guess -- after reading Wikipedia --
> molfiles is for) I would suggest scoring functing and statistical functions
> (like occurance of certain substructures within the database). But again,
> maybe that is not within the scope of MX.

Yes, scoring and statistical functions are outside the scope of MX.
The idea is that MX will contain the core tools to accomplish those
tasks, and that these tools will be fully implemented and thoroughly
tested/optimized. Separate packages based on MX would host high-level
features like scoring functions and database analysis.

You might take a look at CDK, joelib, Open Babel:

http://cdk.sf.net
http://www.ra.cs.uni-tuebingen.de/software/joelib/
http://openbabel.org

The kinds of features you're asking about (and more) are present in
varying degrees of completion in those libraries.

Rich
Reply all
Reply to author
Forward
0 new messages