SMSD
SMSD copied to clipboard
Override Target file with N mapping
Presently its overwriting the target mol in NMCS option. Needs fixing....
Can't reproduce this bug. If I give the command :
./SMSD -T SDF -t Data/arom.sdf -N -O MOL -o tmp.mol
then I get the subgraph in tmp.mol and Data/arom.sdf is still there.
Try these files a) query git clone git://gist.github.com/934995.git gist-934995 (1.mol) b) target git clone git://gist.github.com/934989.git gist-934989 (connected.sdf)
java -Xms500M -Xmx500M -cp SMSD20110421.jar cmd.SMSDcmd -Q MOL -q 1.mol -T SDF -t connected.sdf -N -r -g
The reported error is
Exception in thread "main" java.lang.NullPointerException at org.openscience.reactionblast.graphics.direct.LabelManager.setUsedPosition(LabelManager.java:126) at org.openscience.reactionblast.graphics.direct.DirectAtomDrawer.drawAtomID(DirectAtomDrawer.java:292) at org.openscience.reactionblast.graphics.direct.DirectAtomDrawer.drawAtom(DirectAtomDrawer.java:131) at org.openscience.reactionblast.graphics.direct.DirectAtomDrawer.drawAtoms(DirectAtomDrawer.java:92) at org.openscience.reactionblast.graphics.direct.DirectMoleculeDrawer.drawMolecule(DirectMoleculeDrawer.java:116) at org.openscience.reactionblast.graphics.direct.layout.ZoomToFitGridLayout.layout(ZoomToFitGridLayout.java:50) at cmd.ImageGenerator.createImage(Unknown Source) at cmd.ImageGenerator.createImage(Unknown Source) at cmd.OutputHandler.writeImage(Unknown Source) at cmd.SMSDcmd.runSingleQueryMultipleTarget(Unknown Source) at cmd.SMSDcmd.run(Unknown Source) at cmd.SMSDcmd.main(Unknown Source)
This is also followed by overwriting of the Target.mol.
Ok, so there are several separate issues here:
- The -Q/q options are not currently designed to be used with -N.
- The NPE in the graphics was already fixed, but had not been added.
- Overwriting the Target mol.
The second of these is now fixed in 75f8744ed46746595f6f033803b21e1796a323fe - in the sense that it no longer throws errors, but the underlying problem (label crowding) is more difficult.
The first problem is less clear : if this combination of arguments is valid, the N-MCS method in SMSDcmd will have to be re-written. If they are not meant to be used together, then perhaps SMSD should throw an error?
I'm not sure about the third problem. If the command was -Q MOL ... -T SDF, then each target in the sdf file is written out to a separate file. Also, a large number of images are created. Perhaps there should be separate issues for these?
Thanks Gilleain, Yes we need to think about label crowding and rewriting the options, but presently SMSD should throw some kind of error in handling unsupported options.