From: <we...@in...> - 2003-02-06 11:40:41
|
Hello Daniel, > [C:1]=[O:2]>>[C:1](O)=[O:2] no, adding atoms isn't implemented. Additionally this looks weird !;-) because the transformation is based on two SMARTS substructure searches and the second pattern implies already the product which you want to generate ! Have a look at the examples at http://www-ra.informatik.uni-tuebingen.de/software/joelib/tutorial/functionalities/mol-smarts.html For what is this facility used --> (de)protonation model ! joelib/src/joelib/data/JOEChemTransformation loading transformations:lines 161-180 doing transformations:lines 330-344 the problem is, that the transformation informations (vector bindings) must be stored in joelib/src/joelib/smarts/JOESmartsPattern It's not designed to apply all kind of chemical transformations ! If you want to do that, i would recommend a Patty search: 1. see example joelib/src/joelib/test/TestPatty 2. i would recommend the pattern (only BO=2): [CQ2(=O)C] carbonylC see http://www-ra.informatik.uni-tuebingen.de/software/joelib/tutorial/functionalities/mol-smarts.html 3. now you can add the following things in joelib/src/joelib/test/TestPatty:line 144 if(typeString.equals("carbonylC")) { JOEAtom add2atom = mol.getAtom(i1); JOEAtom addAtom = new JOEAtom(); addAtom.setAtomicNum(JOEElementTable.instance().getAtomicNum("O")); addAtom.setType("O"); if (!mol.addAtom(addAtom)) { throw new MoleculeIOException("Atom could not be added."); } if (!mol.addBond(add2atom.getIdx(), addAtom.getIdx(), 1, 0)) { throw new MoleculeIOException("Bond could not be added."); } } or alternative (better) solution, because it's no good idea to use a hard coding of such tasks. One error and you can invest a lot of time to search such errors. A flexible and transparent text based soulution would be recommended (as in OpenBabel and JOELib shown for simpler tasks). If you want to do this for a lot of different patterns you could also use SMILES patterns which could be added automatically (if you have a method for that !;-), e.g. BO1 SMILES1 B2 S2 ...||reaction ||transformation t2 t3 ... 1 O ||ox_acetobacter|| 1 H ||reduction ||C:1]=[O:2]>>[C:1]-[H:2] ... The first number gives the bond order for the new connection and the SMILES pattern the pattern to be added starting at the first atom of this pattern. The JOEChemTransformation (or a modified version) class can be used with another input file to take standard atom,charge and bond modifications into account. It's possible to add your own ReactTransformation class to joelib/data and the data for this task to joelib/data/plain By the way, do you known the atom property descriptors in JOELib ? Eventually you can use these descriptors for reactivity prediction. Additionally you can use the Petra descriptors (Prof. Gasteiger, Erlangen, Germany) with more atom/bond properties in JOELib (CTX import) ! They used these descriptors also for this task (CACTVS program). I hope that will help you ! I would be pleased if you will adapt JOELib for your needs. I would help you to join your classes into JOELib (if you're interested), but i can not implement AND test them, because i've other main tasks in my project. Best regards, Joerg > Hello, I'm currently an OpenBabel user, but am interested in > "converting" > > I'm mostly interested in SMILES/SMARTS transformations capabilities. > > In particular, Can I represent the following transformation: > > CC=O => CC(O)=O > > I tried this (in OpenBabel) > > [C:1]=[O:2]>>[C:1](O)=[O:2] > > But it didn't work. > > I'd actually hoped it could be as simple as C=O>>C(O)=O, but this was > not to be, so I'm looking around for other options. > > Can JOElib do this sort of thing? > > Of course, t is quite likely this is due to my lack of SMARTS knowledge > rather than the software ;) > -- Dipl. Chem. Joerg K. Wegner Univ. Tuebingen, Computer Architecture, Sand 1, D-72076 Tuebingen, Germany Tel. (+49/0) 7071 29 78970, Fax (+49/0) 7071 29 5091 E-Mail: mailto:we...@in... WWW: http://www-ra.informatik.uni-tuebingen.de |