What is Marvin and how to ...
György Pirok, Szilárd Dóránt
1
May, 2005
Slide 2
Contents
Marvin in action
Features Various file formats Structure Cleaning Stereo features Templates Abbreviated and multiple groups R-group queries Other sketching goodies Calculator Plugins MarvinView tables
Marvin as a building block • Marvin Applets
- Applet specific features - Applet – JavaScript communication - MarvinView tables on the web • Marvin Beans - API examples Integration Import / export
Marvin Applets and Marvin Beans — May 2005
2
Slide 3
Marvin in Action
Marvin Applets and Marvin Beans — May 2005
3
Slide 4
Features
Sketch molecules
– – – – – – – – – – – – – – – – isotopes, charges, radicals, lone pairs stereo atoms and bonds (R/S, E/Z) diastereomers (ABS/AND/OR) alias, pseudo atoms templates abbreviated and multiple groups link nodes curved arrows attached data reactions (automapping) generic atoms and bonds atom lists and not lists SMARTS expressions (even recursive) R-groups Table layout 3D models
Compatible
– – – – – – – – – – MOL, SDF, RXN, RDF (V2000/V3000) SMILES, SMARTS/SMIRKS (recursive too) MRV, CML, PDB copy/paste 2D Cleaning 3D geometry/conformers Shapes, text boxes Calculation Plugins Java applets, signed applets Applications, deployment with • Installer • Java Web Start JavaBeans Java 1.1-1.5 platforms (Windows, Mac, Linux/Unix) full API documentation and examples free for the Academic community
4
Flexible
Available
Design queries
– – – – –
View compound sets
Marvin Applets and Marvin Beans — May 2005
Slide 5
Various file formats
Marvin Applets and Marvin Beans — May 2005
5
Slide 6
Structure Cleaning
CC(C)NCC(O)COC1=C2C=C(C)NC2=CC=C1
topology
2D
3D
Marvin Applets and Marvin Beans — May 2005
6
Slide 7
Stereo features
Marvin Applets and Marvin Beans — May 2005
7
Slide 8
Templates
Marvin Applets and Marvin Beans — May 2005
8
Slide 9
Abbreviated and multiple groups
Marvin Applets and Marvin Beans — May 2005
9
Slide 10
R-group queries
Marvin Applets and Marvin Beans — May 2005
10
Slide 11
Other sketching goodies
curved arrows
link nodes
attached data 3D sketching
Marvin Applets and Marvin Beans — May 2005
11
Slide 12
Calculator Plugins
• ChemAxon’s plugin loading mechanism enables Marvin to provide access to a wide range of dynamically loaded calculation tools • A set of plugins is provided by ChemAxon: pKa, logP, logD, Huckel Analysis, Hydrogen Bond Donor / Acceptor, etc. • Users can easily add their own calculator plugins to this framework
Marvin Applets and Marvin Beans — May 2005
12
Slide 13
MarvinView tables
Marvin Applets and Marvin Beans — May 2005
13
Slide 14
Marvin as a building block
Marvin Applets and Marvin Beans — May 2005
14
Slide 15
Marvin Applets
Browser-independent solution for integrating Marvin applets into the HTML source:
Marvin Applets and Marvin Beans — May 2005
// structure URL as applet parameter
// structure source as applet parameter // applet parameter
15
Slide 16
Applet specific features (1)
1. Both Swing and AWT versions are available for maximum compatibility, the appropriate version for the browser / JRE is automatically selected
2. Signed (trusted) applets enable access to local files, system clipboard and allow printing
Marvin Applets and Marvin Beans — May 2005
16
Slide 17
Applet specific features (2)
3. Modularity
– – – Modular loading of packages ensures fast download-time Modules are not included into the main jar, they are loaded on demand Preloading of frequently used modules can be specified with applet parameter:
msketch_param("preload", "MolExport,Parity,SmilesExport,Clean2D,MyformatExport");
Marvin Applets and Marvin Beans — May 2005
17
Slide 18
Applet – JavaScript communication
• The applet API is accessible from JavaScript, providing a convenient solution to
– Fetch the current structure from the applet in a specified file format. This is typically used for sending the structure to the server for further processing.
– Change the structure or display options of the applet without reloading the page.
Marvin Applets and Marvin Beans — May 2005
18
Slide 19
MarvinView tables on the web
“Live” structures in a HTML page with associated data:
Marvin Applets and Marvin Beans — May 2005
19
Slide 20
Marvin Beans
• Use Marvin Beans to add MarvinSketch or MarvinView as a graphical component to your standalone application • Additional API is accessible for
– – – – Import / Export Performing calculations with plugins 2D and 3D cleaning of structures etc.
Marvin Applets and Marvin Beans — May 2005
20
Slide 21
API example : integration
Adding a Marvin Sketch component to a dialog:
JDialog dialog = new JDialog(…); MSketchPane sketcher = new MSketchPane(); dialog.getContentPane().add(sketcher); … Molecule mol= sketcher.getMol(); //getting the sketched molecule
Adding a Marvin View component to a dialog:
JDialog dialog = new JDialog(…); MViewPane viewer = new MViewPane(); Molecule mol = …; viewer.setM(0, mol); //setting a molecule to display dialog.getContentPane().add(viewer);
Full java source is available at:
www.chemaxon.com/marvin/examples/dialog/DialogLauncher.java.txt
Marvin Applets and Marvin Beans — May 2005
21
Slide 22
API example : import / export
Import:
String fileName=“sample.mol”; MolImporter importer = new MolImporter(fileName); Molecule mol = importer.read();
Export:
String format = … ; byte[] data = mol.toBinFormat(format); // for all formats String output=mol.toFormat(“mol”); //only for text formats
Full java source is available at:
www.chemaxon.com/marvin/examples/converter/SimpleConverter.java.txt
Marvin Applets and Marvin Beans — May 2005
22
Slide 23
Summary
ChemAxon’s MarvinSketch and MarvinView are chemically aware, flexible applications enabling the chemist to draw and display chemical structures and to perform predictive calculations. Marvin Beans and Marvin Applets allow developers to integrate these tools into standalone and web applications with ease.
Marvin Applets and Marvin Beans — May 2005
23
Slide 24
Links
• Marvin home page
– www.chemaxon.com/marvin
• Full Marvin API:
– www.chemaxon.com/marvin/doc/api
• Animated demos and tutorials
– www.chemaxon.com/demosite/marvin
• Brochures:
– www.chemaxon.com/brochures/MarvinSketch.pdf – www.chemaxon.com/brochures/MarvinView.pdf
Marvin Applets and Marvin Beans — May 2005
24
Slide 25
Thank you for your attention
Máramaros köz 3/a Budapest, 1037 Hungary
info@chemaxon.com www.chemaxon.com
Marvin Applets and Marvin Beans — May 2005
25