Posted: Fri Sep 05, 2008 3:06 pmPost subject: RgMolecule converting to Images with MarvinBeans
I've successfully imported a molecule with R-Group into a RgMolecule object using MarvinBeans (we're using MarvinBeans 5.0.7).
Now, I want to convert this Molecule into an image including all R-Groups. This image should look like the display of the Molecule in MarvinSketch, i.e. especially I want the String "R1" marking the groups appear in it.
But If I use toBinFormat() I only get the main molecule without R-Groups. If I import it into a Molecule object, I get the R-Groups but no maker named "R1".
you are right, in 5.0.7 the simple image conversion doesn't seem to include the R-group definitions, though it works nicely with 5.1.x
( using mol.toBinFormat("jpeg:w200,h200"); ).
A quick 5.0.7 solution can be:
// getting the actual scale factor of the canvas
double currentScale = sketchPane.getScale();
// getting the image of the canvas with
// the current scale factor
Image canvasImage = sketchPane.getImage(currentScale);
I hope you can use this or it's possible for you to upgrade.
the exchange of MarvinBeans 5.0.7 with 5.1.1 solves the problem with Rgroups but arises another problem.
If you load the reaction defined in 0rea.mol (or 0rea.mrv) in MarvinSketch, everything looks fine. But when I render it in MarvinBeans 5.1.1. (after loading it as an RgMolecule) the arrow is missing. The same rendering code with MarvinBeans 5.0.7. works fine. Marvin Beans is always fed with the Molfile V3 format.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum