Camelia, the Perl 6 bug

IRC log for #cdk, 2012-04-19

| Channels | #cdk index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
02:09 sneumann_ joined #cdk
05:16 egonw joined #cdk
05:27 sneumann_ joined #cdk
05:45 jbrefort joined #cdk
06:29 konditorn joined #cdk
07:13 Gpox joined #cdk
07:18 slyrus joined #cdk
08:00 jonalv joined #cdk
08:01 Alchimiste joined #cdk
08:02 Alchimiste moin
08:02 zarah hi Alchimiste
08:06 egonw hi jpansanel!
08:14 jpansanel hi egonw!
08:43 konditorn egonw: ping
09:01 egonw pong
09:04 konditorn have you read my mail?
09:07 konditorn egonw: anyway, do you want me to send the patch with the DOUBLE_OR_SINGLE-flag for review on the mailing list?
09:18 konditorn And then this new class AtomTypeAwareSaturationChecker, I've made an first implementation of it (it's quite well described in the GDoc) and then I wrote an test class to it as well. When I send a Quinone (without the double bonds in the ring) it places the the double bound as it supposed to, if I create the molecule as a SMILES. But if I build the molecule myself, it gets a triple bond instead… What do you think about that?
09:56 egonw that sounds like a great start!
09:57 egonw konditorn++
09:57 konditorn =)
09:58 egonw the triple bond sounds like it increased the bond beyond what is allowed for the atom types...
10:01 konditorn mm, it's due to the algorithm: It goes on until the bond (i.e. at least one of the atoms in the bound) is saturated.
10:02 egonw right
10:02 egonw how do you calculate the saturation?
10:02 egonw the trick here is to use the atom type information...
10:03 egonw the max bond order, to be precise
10:03 egonw for C.sp2 atoms, a double bond is the max
10:03 egonw and if double bond, it is saturated
10:03 egonw the old SaturationChecker would indeed check triple as well, as that would be an acceptible bond order for the C element
10:03 konditorn by using SaturationChecker.isSaturated(IBond)
10:04 egonw yes, so that method should be tweaked...
10:04 egonw unit test:
10:04 egonw (ok, this will take some typing)
10:05 konditorn the intresting
10:05 egonw csp2_1 = new Atom("C"); csp2_1.setAtomType("Csp2")
10:05 egonw csp2_2 = new Atom("C"); csp2_2.setAtomType("Csp2")
10:05 egonw csp1_1 = new Atom("C"); csp2_1.setAtomType("Csp1")
10:05 egonw ummm... wrong
10:05 egonw csp1_1 = new Atom("C"); csp1_1.setAtomType("Csp1")
10:05 egonw better
10:06 egonw csp1_2 = new Atom("C"); csp1_2.setAtomType("Csp1")
10:06 egonw csp3_2 = new Atom("C"); csp3_2.setAtomType("Csp3")
10:06 egonw csp3_1 = new Atom("C"); csp3_1.setAtomType("Csp3")
10:06 egonw so: two atoms of each of the three carbon atom types....
10:07 egonw one sec
10:07 konditorn mm, that was what I thought, that I didn't get the creation of the molecules "right"…=)
10:08 egonw one sec...
10:10 egonw assertTrue(new Bond(csp1_1, csp1_2, Order.SINGLE))
10:10 egonw assertFalse(new Bond(csp2_1, csp2_2, Order.SINGLE))
10:10 egonw assertFalse(new Bond(csp3_1, csp3_2, Order.SINGLE))
10:10 egonw assertTrue(new Bond(csp2_1, csp2_2, Order.DOUBLE))
10:11 egonw assertFalse(new Bond(csp3_1, csp3_2, Order.DOUBLE))
10:11 egonw assertTrue(new Bond(csp3_1, csp3_2, Order.TRIPLE))
10:11 egonw you get the point
10:11 egonw now the question is... what about this:
10:11 egonw new Bond(csp1_1, csp1_2, Order.TRIPLE)
10:11 egonw and
10:11 egonw new Bond(csp2_1, csp2_2, Order.TRIPLE)
10:12 egonw these are something like *over*saturated...
10:12 egonw but incorrect
10:12 egonw so, what should the saturate() method return in such situations?
10:13 egonw now, reality is a bit more complex even...
10:13 egonw because it is also the atoms that can be saturated already
10:13 konditorn as usually… =)
10:13 egonw because csp2_1 can already have a double bond in another bond
10:14 egonw so, maybe we should not use a method like saturated(IBond) at all, as that API would not capture the right question
10:16 konditorn the saturated(IBond) returns true if one atom is satunated
10:19 konditorn but it don't care about e.g. the the hybridization so a new method might be a good idea...
10:19 egonw indeed... it could not know about the hybridization yet
10:20 egonw because it was written before we had such atom type info
10:20 egonw in fact, that code was one of the reasons to start the CDK atom typer :)
10:20 egonw what about bondOrderCanBeIncreased(IBond) ?
10:21 konditorn mm… that sounds good...
10:29 konditorn …what shall it care about? the atom state I guess, something more? and how does those thing affect the bond order?
10:30 egonw what do you mean with atom state?
10:33 konditorn hybridization and what ever other properties that the atom can have that affect the bond order...
10:34 konditorn I have to go and eat something… can we talk more later?
10:34 konditorn afk: lunch. =)
10:34 egonw yes, let's talk later
11:44 CIA-142 cdk: Egon Willighagen cdk-1.4.x * rd5948c7 / (2 files in 2 dirs):
11:44 CIA-142 cdk: Backport patch for 'Updated TPSA descriptor to properly cast to IRing rather than different Ring implementations. Added unit test'
11:44 CIA-142 cdk: Change-Id: I152fa5d5efb3b9702ae25c31af5d4e850f2c3faf - http://git.io/Z5jZmw
11:44 CIA-142 cdk: Rajarshi Guha cdk-1.4.x * r090afa9 / (2 files in 2 dirs):
11:44 CIA-142 cdk: Updated TPSA descriptor to properly cast to IRing rather than different Ring implementations. Added unit test
11:44 CIA-142 cdk: Change-Id: I613cdf7728b2f9f9f9ece9a2742104d0c012fa6b
11:44 CIA-142 cdk: Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net> - http://git.io/dyODfg
11:44 konditorn egonw: I'm back.
11:44 egonw ok
11:46 egonw two IAtomType fields are important:
11:47 egonw 1. maxBondOrder
11:47 egonw for C.sp3 this is SINGLE
11:47 egonw (I think I mixed up my unit tests above...)
11:47 egonw for C.sp1 it is TRIPLE
11:48 egonw 2. bondOrderSum
11:48 egonw C.sp1 can have these bond combo's:
11:48 egonw - SINGLE + TRIPLE
11:48 egonw - DOUBLE + DOUBLE
11:48 egonw in both cases the bond order sum = 4
11:48 egonw (in fact, that matches the valency of the atom)
11:49 konditorn can it brave 4 single bonds?
11:49 konditorn *have
11:49 egonw no, that is only for C.sp3
11:49 egonw ok, here's another field important then:
11:50 egonw formalNeighbourCount
11:50 egonw for C.sp3 this is 4
11:50 egonw for C.sp2 it is 3
11:50 egonw for C.sp1 it is 2
11:51 egonw (and there now is theoretical evidence that C$C is not that unrealistic either... :)
11:52 konditorn mm, intresting… =)
11:53 konditorn so this formalNeighbourCount is how many other atoms this atom can be connected to?
12:02 egonw yes
12:02 egonw that can include implicit hydrogens
12:02 egonw that is: assume "missing" connections are implicit hydrogens
12:03 egonw and always are  SINGLE
12:17 CIA-142 cdk: Egon Willighagen master * re158914 / (build.xml jar/javacc.jar jar/javacc.jar.meta):
12:17 CIA-142 cdk: Upgraded to JavaCC 5.0
12:17 CIA-142 cdk: Change-Id: I77b8fb2d3433f3bdb9691f98f5d8f188d6a91671
12:17 CIA-142 cdk: Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com> - http://git.io/V-edGQ
12:17 CIA-142 cdk: Egon Willighagen master * rd6c7c32 / (2 files in 2 dirs): (log message trimmed)
12:17 CIA-142 cdk: Patch to report candidate constructors when failing to instantiate a class because of an incorrect number of passed parameters. (fixes #2987186)
12:17 CIA-142 cdk: Example output:
12:17 CIA-142 cdk: No constructor found for NNAtom with the given number of parameters.
12:17 CIA-142 cdk: Candidates are: NNAtom(), NNAtom(String), NNAtom(IElement),
12:17 CIA-142 cdk: NNAtom(String, Point3d), NNAtom(String, Point2d)
12:17 CIA-142 cdk: Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
12:17 CIA-142 cdk: Egon Willighagen master * r31b079b / src/test/org/openscience/cdk/Abs​tractChemObjectBuilderTest.java :
12:17 CIA-142 cdk: Added a unit test to see if we get suggestions
12:17 CIA-142 cdk: Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
12:17 CIA-142 cdk: Conflicts:
12:17 CIA-142 cdk:  src/test/org/openscience/cdk/Abs​tractChemObjectBuilderTest.java
12:18 konditorn I guess that e.g. a C.s1 and a C.sp4 can be connected via a (single) bond…?
12:20 egonw yes, C.sp1 can have up to one SINGLE
12:20 egonw C.sp2 up to two
12:21 egonw C.sp3 can have four
14:06 sneumann_ joined #cdk
15:26 konditorn left #cdk
15:51 egonw joined #cdk
17:17 slyrus joined #cdk
17:43 slyrus joined #cdk

| Channels | #cdk index | Today | | Search | Google Search | Plain-Text | summary