Package chemaxon.marvin.io.formats.mdl
Class MolfileUtil
java.lang.Object
chemaxon.marvin.io.formats.mdl.MolfileUtil
MDL molfile related utility methods.
- Since:
 - Marvin 5.1.6, 03/10/2009
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic intcodeHIsotopeMass(int originalCode, int massNo) Add mass number information to the given code.static intdecodeHIsotopeMass(int code) Extract H isotope information from the given Chemaxon compressed mol format code of the atom.static IntegergetSgroupType(String name) Gets the S-group type.static booleanTests whether the specified symbol is a Beilstein Generic except A, Q and X.static byte[]MDLCT2MDL(byte[] data) Converts an MDLCT data to MDL. 
- 
Field Details
- 
SGROUP_TYPENAMES
Array of S-group type names. 
 - 
 - 
Constructor Details
- 
MolfileUtil
public MolfileUtil() 
 - 
 - 
Method Details
- 
getSgroupType
Gets the S-group type.- Parameters:
 name- the S-group type name- Returns:
 - the type or 
nullfor invalid type name 
 - 
isSpecBeilsteinGeneric
Tests whether the specified symbol is a Beilstein Generic except A, Q and X.- Parameters:
 s- the S-group type name- Returns:
 - the type or 
nullfor invalid type name 
 - 
decodeHIsotopeMass
public static int decodeHIsotopeMass(int code) Extract H isotope information from the given Chemaxon compressed mol format code of the atom.- Parameters:
 code- given code- Returns:
 - the mass number stored in the code
 
 - 
codeHIsotopeMass
public static int codeHIsotopeMass(int originalCode, int massNo) Add mass number information to the given code. Utility for compressed mol format coding of H isotopes.- Parameters:
 originalCode- the code to which mass number is addedmassNo- the mass number- Returns:
 - the modified code
 
 - 
MDLCT2MDL
Converts an MDLCT data to MDL. MDLCT format: sequence of records where each record is a C like String. Each record stores a line of the molfile (without EOL character). The first byte describes how many bytes are allocated for the string.The MDLCT stream starts with a zero byte since Mol file starts with an empty line. - Parameters:
 data- the clipboard transferable MDL bytes- Returns:
 - an MDL file as a byte array
 - Throws:
 IOException
 
 -