Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override Target file with N mapping #1

Open
asad opened this issue Apr 21, 2011 · 4 comments
Open

Override Target file with N mapping #1

asad opened this issue Apr 21, 2011 · 4 comments
Assignees
Labels

Comments

@asad
Copy link
Owner

asad commented Apr 21, 2011

Presently its overwriting the target mol in NMCS option. Needs fixing....

@ghost ghost assigned gilleain Apr 21, 2011
@gilleain
Copy link
Collaborator

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.

@asad
Copy link
Owner Author

asad commented Apr 21, 2011

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.

@gilleain
Copy link
Collaborator

Ok, so there are several separate issues here:

  1. The -Q/q options are not currently designed to be used with -N.
  2. The NPE in the graphics was already fixed, but had not been added.
  3. Overwriting the Target mol.

The second of these is now fixed in 75f8744 - 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?

@asad
Copy link
Owner Author

asad commented Apr 25, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants