Spicoli supports the following storage formats:
Old GRASP format
OpenEye format based upon tagged binary files
The GRASP format is provided for backwards compatibility with older visualization programs. There were byte ordering issues with the format so OpenEye developed a more flexible format based upon the tagged binary IO available in OESystem.
Attached to Molecules¶
The OpenEye format allows surfaces to be attached to molecules and
then written out to OEBinary (.oeb) files. A visualizer can then read
in the molecule and surface without any other means of making the
demonstrates how to properly attach surfaces to molecules.
Listing 1: Attaching a surface as generic data to be written to OEB
OESurface surf = new OESurface(); oespicoli.OEMakeMolecularSurface(surf, mol); oespicoli.OESetSurface(mol, "surface", surf); oemolostream ofs = new oemolostream("foo.oeb"); oechem.OEWriteMolecule(ofs, mol); ofs.close();
Listing 2 demonstrates how to
then read that surface back out of the OEB file.
Listing 2: Retrieving a surface attached as generic data from an OEB file
oemolistream ifs = new oemolistream("foo.oeb"); oechem.OEReadMolecule(ifs, mol); ifs.close(); OESurface msrf = oespicoli.OEGetSurface(mol, "surface");
Versions of Spicoli prior to 1.0.2 required
OEInitSurfaceHandlers in order to have
surfaces attached to molecules be read and written to and from OEB.