saving meflow/reaction/mdocuments to disk

User 56c4fc7140

22-02-2007 20:35:14

Hi,





I'm a total NOOB, so please pardon my questions...





(1) how do you add a reaction object to a mdocument?





(2) how do you add an meflow object to a mdocument?





(3) how do you directly write (export) a mdocument object to disk? MolExport only works with mol/rxnmol objects. Is there another exporter utility?





Thanks!

ChemAxon 7c2d26e5cf

23-02-2007 14:40:24

Quote:
(1) how do you add a reaction object to a mdocument?
You can not add, just change the molecule in the MDocument: MDocument.setMainMoleculeGraph(MoleculeGraph)


or create a new MDocument and give the reaction molecule in its constructor: new MDocument(molecule)
Quote:
(2) how do you add an meflow object to a mdocument?
To add an MEFlow object to an MDocument, use MDocument.addObject(MObject)
Quote:
(3) how do you directly write (export) a mdocument object to disk? MolExport only works with mol/rxnmol objects. Is there another exporter utility?
To save it to file, use MDocument.exportToBinFormat(String)


Code:
byte[] data = doc.exportToBinFormat(format);


if(data != null) {


   String outfile = "output."+format;


   OutputStream out = new FileOutputStream(outfile);


   out.write(data);


   out.close();


}


User 56c4fc7140

06-03-2007 20:57:38

Thanks! That helped

User 56c4fc7140

20-08-2008 19:53:59

Hi,





(Marvin and arrow drawing)





When creating a eflow object, is there anyway to set an atom's lone pair as the source of an arrow? If there's no direct way of doing so, is there anyway to obtain the coordinates of an atom's lone pair and then set that as the source coordinate of an eflow object?





Thanks,


Paul

ChemAxon e500b51457

21-08-2008 10:29:46

Hello,





Unfortunately there is no way to obtain the coordinates of an atom's lone pair and then set that as the source coordinate of an eflow object because lone pairs are not graphical objects.


We plan to implement the solution for your problem but we don’t know which release will contain the implementation because the scheduling of tasks for 5.2 is in progress.





Best regards,


Erika.

User 44bb556150

03-09-2008 23:00:36

Hi, I'm interested in the same issue of being able to draw electron flow arrows from lone pairs instead atoms. I'm actually pretty sure this is already possible, as MarvinSketch does appear to support an explicit Lone Pair (LP) object (it's also mentioned in the 5.1 release notes).





Attached is an example where I was able to piece such a diagram together. I found the LP object as a special type of "Query Node" from the atom selection window (MarvinSketch 5.03).





This is largely satisfactory from a functional point of view, but the presentation looks very awkward. Showing a "bond" to the lone pair object, which itself is represented as the characters "LP" looks very unnatural. The representation of the implicit lone pairs is much better, with just a pair of dots hovering near the parent atom.





Is there a way to refactor or customize the appearance of these explicit lone pair objects to be more similar to the implicit lone pair appearance?





Side question: This already works as an explicit lone pair object, but is there an analogous explicit radical object? I could not find it in the atom menu.

User 870ab5b546

05-09-2008 12:43:29

I think a good solution to this request requires only a little tweaking of the graphic generator:





If an electron-flow arrow originates at an atom, and the atom's lone pairs are displayed, then place the base of the arrow next to the lone pair. Otherwise, place it next to the atom symbol.

ChemAxon e500b51457

05-09-2008 13:10:17

Dear Jonathan,





The LP atom created in the periodic table query tab is not a graphical object. It’s a special atom with an atom symbol “LP” (standard MOL file feature in Ctfile) to represent an atom that can have lone pairs and used especially during substructure search. Because it’s an atom object that has coordinates, bonds can be drawn from it and electron flow arrows can be started at it.
Quote:
Is there a way to refactor or customize the appearance of these explicit lone pair objects to be more


similar to the implicit lone pair appearance?
There is no way to customize the appearance of LP atoms to look similar to the “double dot” lone pairs, as it is represented as a separate atom and bond.


Double dots are only drawn next to the atoms but are not graphical objects yet. This means that they cannot be selected, moved, etc and electron flow arrows cannot be started at it. Later we plan to implement the solution for this latter problem (to start an electron flow arrow at it).
Quote:
This already works as an explicit lone pair object, but is there an analogous explicit radical object? I could not find it in the atom menu.
There is no distinguished radical object in Marvin. You can add radicals from Atom > Radical menu but those are simple drawn dots similarly to the implicit lone pairs. However, you can define your own pseudo atoms using the “Pseudo” button in the query tab of the periodic system window. This will allow you to draw atoms with any custom atom symbol, e.g . “Radical”.





Best Regards,


Erika.
Quote: