Camelia, the Perl 6 bug

IRC log for #cdk, 2010-06-04

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

All times shown according to UTC.

Time Nick Message
04:53 sneumann joined #cdk
05:01 sneumann_ joined #cdk
05:07 egonw joined #cdk
05:15 jbrefort joined #cdk
05:53 bag_ joined #cdk
06:27 sneumann_ joined #cdk
07:15 Gpox joined #cdk
08:06 egonw joined #cdk
08:06 egonw Gpox: ping
08:06 egonw Gpox: got time to wave?
08:06 Gpox sure
08:15 egonw https://wave.google.com/wave/wav​eref/googlewave.com/w+BOLBbwxHA
08:33 jonalv joined #cdk
08:33 egonw hi jonalv!
08:33 jonalv hi egonw, I feel terrible today, I have a cold, I slep almost 11 hours and still struggled to get out of bed :(
08:34 jonalv egonw: how are you?
08:34 egonw welcome to my live
08:34 jonalv egonw: you sleep 11 hours?
08:34 egonw btw... this cold virus is all over the place... (no, not last night, but earlier this week I did)
08:34 egonw my kids have it too, and so had I
08:34 jonalv aha
09:16 egonw Gpox: I'm considering doing the same for IRenderer...
09:16 egonw any objections?
09:17 Gpox no
09:22 egonw cool... the patch seems to work... the IGenerator<T extends IChemObject> bit at least...
09:25 carsten joined #cdk
09:28 egonw hi carsten
10:42 maclean joined #cdk
10:43 maclean morning (just)
11:02 egonw hi maclean
11:02 maclean hi
11:02 zarah hi maclean
11:02 egonw you got a wave
11:02 maclean I swam in it.
11:02 egonw IProtein?
11:02 maclean Maybe.
11:03 maclean It's hard to know if the CDK data model could be extended to biomolecules.
11:03 maclean I know protein Atoms are no different to benzene Atoms, but still.
11:06 maclean Anyway, I remembered why getScale() is necessary - if you want a bond width on screen of 2 (screenspace) then it is necessary to calculate modelWidth = screenWidth / scale.
11:06 egonw mom, phone
11:20 egonw back
11:21 egonw you mean that the width of a line does not scale with affine transformations?
11:23 maclean it does, you are right.
11:23 maclean but fundamentally, it is too late to change all this now.
11:23 egonw well.. you know me
11:23 maclean I do :)
11:24 maclean Right, so you would like all the 10 remaining RenderingParameters as IGeneratorParam in some generator?
11:24 egonw indeed
11:24 maclean And then a patch file, or uploaded as a branch to my github cdk?
11:24 egonw several should go into the HighlightingGenerator
11:25 egonw or whatever it is called exactly
11:25 egonw yes, either is fine
11:25 maclean Yep,  the highlight shape, highlight distance.
11:26 maclean showMoleculeTitle is probably basic scene.
11:27 maclean wedgeWidth is extendedBondGenerator
11:27 maclean willDrawNumbers is extendedAtomGenerator. etc, etc.
11:27 egonw sounds good to me
11:28 maclean Ok, and what about the remaining in the RendererModel? highlughtedAtom/Bond, selections, merge?
11:28 maclean oh, and clipboard.
11:29 maclean No, wait. Those aren't parameters/
11:29 egonw have been thinking about that...
11:29 maclean arrowHeadWidth is.
11:29 egonw I think they are...
11:29 maclean Really?
11:29 egonw arrowHeadWidth is not already done? I think I did that one... mmm
11:29 egonw yeah, why not?
11:30 maclean Weeeellll.
11:30 maclean They're more like 'external data'.
11:30 maclean So you have the chemical model (IAtomContainer etc) and the external model (highlights, selections, etc).
11:31 maclean Many applications will be about merging external data (usually through selections) with the chemical data.
11:32 egonw from an API level, I think this is the best approach...
11:32 egonw thinking about it... perhaps IAtomContainer should be a parameter to IGenerator impls, really ...
11:32 egonw which would remove that assymmetry
11:33 maclean what, "public IRenderingElement generate(IAtomContainer container);" ?
11:33 maclean And force the chemical model to hold all selection data, etc?
11:34 egonw no, the other way around...
11:34 egonw an IGeneratorParameter AtomsToDisplay<IAtomContainer>
11:34 egonw :)
11:35 maclean But that really isn't a parameter. Width, color, scale; these are parameters. I don't think it makes it cleaner to combine them with selections.
11:36 maclean This was the problem with the RenderModel in the first place - a big bag of unidentifiable things.
11:36 egonw true
11:37 egonw anyway...
11:37 egonw I think HighLightedAtom<IAtom> is somewhere in between...
11:37 egonw btw, I will add this method, per Gpox's request:
11:37 egonw setParameter(IGeneratorParameter<T>, T)
11:38 maclean ok, sounds good.
11:38 maclean I think...
11:45 bag joined #cdk
12:05 egonw maclean: https://wave.google.com/wave/wav​eref/googlewave.com/w+BOLBbwxHC
12:05 egonw I think you might find that script useful
12:06 egonw Gpox: you too, likely
12:07 maclean heh. I haven't seen the wave online update before. neat.
12:08 egonw mmm... the script almost works...
12:08 Gpox I guess it is allright
12:08 egonw it only has trouble with deleted files
12:08 egonw which makes sense :(
12:09 egonw because of the: ant clean runDoclet
12:09 egonw which will remove the removed classes from the module .java file list :(
12:09 egonw tricky corner case
12:11 maclean http://tlrobinson.net/blog/2​008/11/13/ant-tasks-for-git/
12:11 zarah maclean's link is also http://tinyurl.com/3xbpyqm
12:11 maclean heheh.
12:18 egonw ok, add -u add the deleted files too
12:18 egonw but that might leave out new files ...
12:19 egonw can't see how to have the best of both worlds
12:19 egonw you might want to duplicate lines
12:21 egonw ok, not entirely clear when to run "ant clean runDoclet"
12:21 egonw depends on one adding and removing files from a particular module...
12:26 maclean egonw : what do you think about having a BaseHighlightGenerator that AtomHighlightGenerator and BondHighlightGenerator extend?
12:26 maclean So that highlight parameters can go there.
12:26 egonw sounds good
12:27 maclean An alternative might be to have HighlightAtomDistance and HighlightBondDistance.
12:27 egonw alternatively...
12:27 egonw what is the reason BondHG and AtomHG are separate?
12:27 maclean So that you can easily avoid highlighting one or the other by excluding the appropriate generator.
12:27 egonw oh... btw... I was also thinking of using generics for IRenderer
12:28 egonw IRenderer<IAtomContainer>
12:28 egonw and IRenderer<IReaction>
12:28 egonw (which are the current two, I think)
12:28 egonw maclean: ah, is that actually used as such? :)
12:28 maclean I don't understand that question.
12:29 maclean Are highlight generators used?
12:29 egonw AtomContainerRendered implements IRenderer<IAtomContainer>
12:29 maclean Well, I never made the IRenderer interface...
12:30 egonw but no objections either?
12:30 egonw will further clean up the code
12:30 maclean Indeed, I deleted the old interfaces in favour of a single renderer :)
12:30 egonw and make the intention more clear
12:30 egonw intention & scope
12:30 maclean However, I agree that more microlithic renderers is probably a good design descision.
12:31 egonw and can help ensure no IGenerators are added to the wrong IRenderer
12:31 egonw ummm... ok, let me rephrase that last line :)
12:31 egonw and can help ensure no IGenerator<IReaction> are added to the wrong IRenderer<IAtomContainer>
12:31 maclean Hmmm. Indeed. Otherwise reactions will be passed to atomcontainer generators.
12:31 egonw by sharing the T of register(), I think
12:50 egonw Gpox, maclean: is paint(IAtomContainer, IDrawVisitor) the main point of access of an IRenderer?
12:50 maclean yes
12:51 egonw wow...
12:51 egonw Renderer is not fun looking at
12:51 maclean why?
12:52 egonw it's trying to solve world piece, I think
12:52 maclean I KNOW.
12:52 egonw then why did you not complain?
12:52 maclean Well, everyone wanted something different.
12:53 * egonw has been a bad project leader :(
12:53 maclean There's drawing in a window that can be resized, there's drawing in a scrolled window, there's drawing in a fixed image size...
12:54 egonw being project leader only works of the workers acknowledge authority, and the leader knows he can 'order' something
12:54 egonw maclean: yeah, pretty bad indeed
12:54 egonw those must be separate
12:54 egonw this is not OOP
12:54 maclean Er..
12:54 egonw oh wiat...
12:54 egonw new SolvesTheWorldObject()
12:55 egonw nothing wrong with that of course
12:55 maclean No, it is not a god class.
12:55 maclean It is reasonable to have a single renderer that does all these things, just difficult.
12:55 maclean And then people come along and change it....
12:56 egonw I rather see:
12:56 egonw FixedSizeReactionRenderer
12:56 egonw SizeableWindowMoleculeRenderer etc
12:56 maclean ScrollableWindowReactionRendererFactory
12:57 egonw -Thingy ?
12:57 egonw :)
12:57 egonw yes, that's a downsize... long names
12:57 egonw but at least it would be more maintainable...
12:57 egonw and people might actually understand what they could expect too...
12:58 egonw anyway... we're in Friday-Ranting mode, right?
12:58 maclean True.
12:58 maclean But I guess I never actually considered splitting it up.
12:59 maclean I tried as hard as possible to make the usage simple - "renderer.setup(canvas); renderer.paint(canvas)"
12:59 maclean but there are all sorts of special tricks that I'm not happy about.
12:59 egonw public class AtomContainerRenderer implements IRenderer<IAtomContainer> {
13:00 egonw mmm...
13:02 egonw ok, that patch will currently not work...
13:02 maclean oh?
13:02 egonw cannot implement IRenderer<IAtomContainer> and IRenderer<IChemModel> at the same time
13:02 egonw which is caused by Renderer extending AtomContainerRendere
13:03 egonw it should wrap it instead, I guess
13:03 egonw but, that's too much work for a friday afternoon...
13:03 egonw need to get back to BC 2.4...
13:03 egonw maclean: got any patches?
13:03 egonw want to release 11
13:04 egonw so that I can update and continue bioclipse 2.4
13:04 maclean I'm working through the parameters, one at a time. Each in a separate commit.
13:04 maclean It's surprisingly slow work.
13:04 egonw ok, we'll add that in 12 then
13:04 egonw yes, it is...
13:04 maclean Ok.
13:04 egonw weird, isn't it...
13:04 egonw the 7 I did yesterday also took me hours
13:05 maclean Now trying to work out how to squash commits, as I forgot about all the highlight distance in controller.
13:05 egonw git rebase -i HEAD~X
13:06 egonw where X is the number of patches you need to go back in history
13:06 egonw then use the 's' of 'f' option for the *second* patch
13:06 egonw second := the most recent patch you want to merge with the older first patch
13:07 maclean ok, takk.
13:09 egonw det var ingeting
13:10 maclean "he lodge was something"?
13:10 maclean s/he/the/
13:10 egonw mmm... perhaps
13:10 egonw my swedish is not that good yet :)
13:10 maclean :)
13:17 egonw ok, version 11 is now on sourceforge'
13:31 egonw export made for bioclipse... now testing to see how many compile errors are now left...
13:31 egonw had some 16 left yesterday...
13:35 egonw ok, now it is 813 :)
13:37 egonw it seems a bit confused about depds
13:37 egonw that's better...
13:37 egonw 9 left :)
13:41 egonw ok, fixed
13:42 egonw the IGenerator patch in 11 helped quite a bit :)
13:43 egonw got to reboot my IRC client... brb
13:43 egonw joined #cdk
13:44 maclean hmmm. egonw there may be a design problem with IGeneratorParameters.
13:45 egonw go on
13:45 maclean If one generator extends another, how are its List of IGeneratorParameters handled
13:45 egonw hide the parent parameters?
13:45 maclean so, say BasicAtomGenerator provides parameters X, Y - but ExtendedAtomGenerator provides Z
13:46 egonw no, that would not work
13:46 egonw return all, I think...
13:46 egonw but then it would not share those params
13:46 maclean I think it has to call the superclass method, and add its to the end
13:46 maclean to get {X, Y, Z}
13:46 egonw indeed
13:47 maclean but of course, the user has to be careful not to use both a base class and a derived.
13:47 maclean otherwise they will get multiple references of the same parameters.
13:48 egonw or the last...
13:48 maclean Perhaps the render should enforce a Set of parameters rather than a List.
13:48 egonw depending on when which generator was registered
13:48 maclean Yes, maybe an overwritten version.
13:49 sneumann_ joined #cdk
13:49 maclean Unless code like : "for (IGeneratorParameter p : model.getParameters()) { if p instanceof SomeParamClass { return p.getValue() }}"
13:50 egonw true
13:50 egonw but
13:50 egonw some generators use the local instance...
13:50 egonw instead of requesting it via the model
13:50 egonw perhaps we should fix that
13:51 maclean Perhaps.
13:51 * egonw is trying to boot Bioclipse 2.4
13:52 egonw hahahahaha
13:53 egonw lovely :)
13:53 egonw I think there are some regressions :)
13:56 maclean Looks awful, eh?
13:56 egonw it's not that bad...
13:56 egonw bond width is too much
13:56 egonw so is highlight radius
13:57 egonw otherwise it seems ok
13:57 maclean Last rendering parameter in RenderingParameters class.
13:58 egonw maclean++ (assuming he is talking about his patches)
13:58 maclean I am, yes.
14:00 * egonw is checking the generators are all returning the parameter instances
14:04 egonw I spot one missing in BasicAtomGenerator
14:04 egonw showExplicitHydrogens was not returned
14:05 maclean I think I added that.
14:05 maclean I mean in the patches I am about to send you :)
14:05 egonw ack
14:05 egonw will wait then
14:05 maclean No, wait, I didn't.
14:06 maclean I changed ExtendedAtomGenerator.
14:06 egonw and bondDistance is missing from BasicBondGenerator
14:06 maclean And I see that it is wrong now :(
14:07 maclean Right, well I won't change those - feel free to. I'll make the patch instead.
14:07 egonw ack
14:09 egonw and SelectAtomGen is not returning selectionShape
14:10 maclean Ah. That is in my patch.
14:10 maclean Mainly as it was something I wanted :)
14:14 egonw ack
14:17 maclean patches mailed in a tar.gz file.
14:17 maclean now - coffee!
14:17 egonw got them
14:17 * egonw is checking if maclean used the splitCommit script ...
14:18 egonw good, he did not :)
14:19 egonw we'll, it's only 13 patches I need to split up then :)
14:19 egonw hahahaha
14:19 egonw nice clean patches, btw"
14:19 egonw nice clean patches, btw!
14:20 egonw maclean++
14:22 maclean Well, there is one patch that affects only controller, the rest affect renderer. I think.
14:28 egonw http://blueobelisk.shapado.com/questions/how-to-g​et-an-experimental-ligand-structure-from-the-pdb
14:28 zarah egonw's link is also http://tinyurl.com/362yblc
14:29 egonw nice question
14:31 egonw maclean: it's more like this:
14:31 egonw 0001 touches files in different modules
14:32 egonw I am trying to keep each module separate
14:32 egonw that way, patches (except in 13) in 'subsequent' branches do not change the code in other branches...
14:32 egonw that keeps the rebasing clean
14:32 egonw so, I'll split up 0001 into, I think, 4 patches
14:33 egonw for render, renderbasic, renderawt, and rendersvg
14:34 maclean back
14:35 maclean ugh. I really hate modules - did I mention that?
14:35 maclean (sorry)
14:35 egonw :)
14:36 maclean but I can't think of a better architecture for splitting up a project as large as cdk.
14:36 maclean not without having many sub-projects.
14:37 egonw indeed
14:39 egonw 2010-06-04 13:17 maclean            [13-unsorted-patches] Changed wedge width to rendering parameter
14:39 egonw 2010-06-04 13:17 maclean            Changed wedge width to rendering parameter
14:39 egonw 2010-06-04 13:17 maclean            Changed wedge width to rendering parameter
14:39 egonw 2010-06-04 13:17 maclean            Changed wedge width to rendering parameter
14:39 zarah 2010-06-04 13:17 maclean            Changed wedge width to rendering parameter
14:39 egonw :)
14:39 egonw I love git :)
14:39 egonw hahaha
14:39 egonw zarah++
14:40 egonw maclean: this is one of your patches split up by module
14:40 maclean Thought as much, yes.
14:40 egonw with a script similar to the one in the wave
14:41 maclean So you would prefer all commits to cdk repositories to be split like this?
14:41 maclean Or just the JCP ones?
14:41 egonw no, just these
14:41 egonw reason:
14:42 egonw because I like the render module to be reviewed asap
14:42 egonw and submit each next module asap as well
14:42 egonw but that requires things to be split up
14:42 maclean ahhh. one module per review.
14:42 maclean I C.
14:42 egonw indeed
14:42 egonw otherwise it is much to big blog
14:42 egonw otherwise it is much to big blob
14:42 egonw like with the SMSD code
14:43 egonw tooks months to get that reviewed
14:43 maclean yeah, that was huge.
14:43 egonw and not even really properly done...
14:43 egonw but the best we/I could do
14:43 maclean I sort of think that SMSD should have been a separate project, with a CDK implementation as a module.
14:44 maclean That's what I've been trying to do with the signature stuff.
14:44 maclean That way, other chemistry java projects can use it.
14:45 maclean But, the disadvantage of this approach is the lack of docs from the library code.
14:45 maclean And, of course, less rigorous unit testing :)
14:46 s9asad joined #cdk
14:46 egonw and more difficult to track bugs
14:46 egonw ha s9asad!
14:46 maclean yes, that too.
14:46 s9asad Hi everyone
14:47 maclean But it does allow for more general tests of the library outside the cdk.
14:47 egonw maclean: grmp... I cannot patch 0002 to apply :(
14:47 maclean oh :(
14:47 egonw git mergetool -> does not work either :(
14:48 maclean it is very similar to 0001
14:49 maclean does it give a reason?
14:49 egonw yeah, the RendererModel blob fails
14:50 maclean Weird. That's just removing lines.
14:51 egonw indeed
14:51 s9asad Just a quick query ...as I can see you all are very busy today:-)....
14:52 egonw :)
14:52 s9asad How can I write back radical in MDL format
14:52 s9asad :-)
14:52 egonw s9asad: secretly monitoring the logs for SMSD mentioning? ;)
14:52 egonw if the feature is implemented, I guess it would do that automatically
14:53 s9asad well
14:54 s9asad Oh just read some comments about SMSD log after you mentioned ;-)
14:55 egonw just coindidence then?
14:55 * egonw looks with a suspicious eye as asad ;)
14:55 s9asad yes indeed, I was here to ask about radicals as I struggling to write it back into RXN format
14:55 s9asad :-)
14:56 s9asad pure "coincidence"
14:56 s9asad so any idea how to write the RAD line in the MDL using CDK writer
14:57 egonw write a patch
14:57 egonw (with unit tests, please)
14:57 s9asad okies
14:58 maclean Well, the MDLV2000Reader reads in ISingleElectrons.
14:58 maclean (line 760)
14:59 maclean from lines starting "M RAD"
15:00 egonw yeah, should allow one or two good roundtripping tests
15:00 maclean hmmm. also:
15:00 maclean final double ATOM_RADIUS =
15:00 maclean ((AtomRadius)model.getRenderin​gParameter(AtomRadius.class)).
15:00 maclean getValue();
15:00 egonw ISingleElectron -> MDL molfile -> ISingleElectron
15:01 maclean Heh. " // TODO : put into RendererModel" - too late, too laaaate.
15:01 egonw yeah, saw that too...
15:01 maclean I blame that maclean guy.
15:02 egonw no, patch 0002 is bad
15:02 maclean :(
15:02 egonw was manually removing those two RendererModel methods
15:02 egonw but the patch does not touch e.g. ControllerHub that still uses that method
15:03 egonw which is patch 0003
15:03 egonw ah!
15:04 maclean hmm. I did start to do a git rebase -i at that point.
15:04 maclean but gave up on it (or so I thought).
15:04 maclean That may be the problem, sorry.
15:05 egonw no worries
15:08 maclean oop. got to go. egonw : mail me if there are other problems, or you need other things done on renderer module family.
15:08 egonw ok, thanx for your patches!
15:25 s9asad joined #cdk
15:44 s9asad / write atoms with radical
15:44 s9asad for (int i = 0; i < container.getAtomCount(); i++) {
15:44 s9asad ISingleElectron electron = container.getSingleElectron(i);
15:44 s9asad if (electron != null && electron.getElectronCount() > 0) {
15:44 s9asad writer.write("M  RAD  1 ");
15:44 s9asad writer.write(formatMDLInt(i + 1, 3));
15:44 s9asad writer.write(" ");
15:44 s9asad writer.write(formatMDLInt(e​lectron.getElectronCount(), 3));
15:44 s9asad writer.newLine();
15:44 s9asad }
15:44 s9asad }
15:44 s9asad Does this make sense
15:44 s9asad ?
15:45 egonw looks reasonable
15:45 egonw make sure to write a test that checks that the output can be read again with the MDLV2000Reader too
15:45 egonw that would be a good test
15:46 s9asad sure
15:50 egonw got to catch a bus
15:50 egonw bye
17:16 sneumann_ joined #cdk
18:44 egonw joined #cdk
18:46 sneumann_ joined #cdk
18:56 egonw sneumann_: ping
19:04 CIA-47 org.openscience.cdk: Egon Willighagen bioclipse2.4 * rb9699e8 / (43 files in 22 dirs): Uploaded CDK-JChemPaint 11 - http://bit.ly/9vJoZA
19:04 CIA-47 org.openscience.cdk: Egon Willighagen bioclipse2.4 * r21a2ef5 / (5 files in 3 dirs): Added JNI-InChI 0.7 - http://bit.ly/d0HrdG
19:04 CIA-47 org.openscience.cdk: Egon Willighagen bioclipse2.4 * rd381bb6 / plugins/org.openscience.cdk.​sinchi/META-INF/MANIFEST.MF : Depend on jniinchi.standard, and import nu.xom and cmldom like in Bioclipse - http://bit.ly/dAXgCK
19:29 sneumann_ egonw pong
20:36 bag_ joined #cdk
21:20 s9asad joined #cdk
21:58 s9asad left #cdk

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