Version 1.3.4¶
OEChem 1.3.4¶
New Features¶
A new
OEChemIsLicensed
API point has been provided to allow an application to check whether the OEChem, OESystem and OEPlatform libraries have managed to find a suitable run-time license. This function can safely be called from programs to determine a priori whether using OEChem functionality may trigger a fatal error, allowing a warning to be issued and/or calls the affected functionality to be avoided.A new
MOL2::Substructure
flavor has been added to the high-level writers (and a new default argument to the low-levelOEWriteMol2File
) to force the writer to emit a suitable@TRIPOS<SUBSTRUCTURE>
record even for molecules having only a single substructure. The default behavior remains the same (to omit the record for small molecules) to save space in the common case.OEChem’s SMILES format parser,
OEParseSmiles
, has been tweaked to treat SMILES with inconsistent cis/trans bond stereo, such asC/C=C(/C)/C
, as a soft warning rather than as a hard error. Previously, OEChem followed the Daylight toolkits, treating this as a serious error, and returning an empty molecule. The new behavior is that a warning is now thrown toOEThrow
, but the molecule is returned, just without specified stereochemistry for the problematic bond(s). This allows OEChem to be used to correct/recover SMILES generated by buggy SMILES writers.The functions
OEAtomSetMDLParity
andOEAtomGetMDLParity
have been introduced, to simplify the task of storing and retrieving the MDL parity value associated with each atom.The OEB file format readers and writers will now preserve PDB file header records, if they are present on the original molecule.
A new function
OEGetCenterAndExtents
can be used to retrieve the center and 3D extents of a given OEMolBase.The file format extension
.isosmi
is now treated as a synonym for.ism
, indicating isomeric SMILES.The
OEQMolBase::BuildExpressions
function now avoids constructing an atomic hybridization constraint if the query atom’sOEAtomBase::GetHyb
method returns zero.
Major bug fixes ——————————————————————————–^
A problem with the generation of canonical isomeric SMILES has been fixed, that for pathological molecules with specified cis/trans stereochemistry could cause the canonical SMILES string to be written using
/
(forward slash) for some input orderings and/
(backslash) for others. The resulting SMILES weren’t incorrect (and the perceived symmetry invariants were fine), but this allowed equivalent isomers to be given non-identical isomeric SMILES strings.Fixed a bug in the 1.3.3 changes to the
OEPerceiveResidues
function. The new functionality to identify an acetyl as an N-terminal blocking group, PDB codeACE
, could get confused when pattern matching some pathological graphs, such as proteins with N-terminal proline residues.Fixed a bug in the OEB file format writer that could result in the coordinates of a multiconformer molecule becoming scrambled if the atoms of the OEMolBase has been reordered, with
OEMolBase::OrderAtoms
, (and no atoms had been deleted) before writing the molecule. This could also affected theOEMolBase::Compress
andOEMolBase::UnCompress
methods.Fixed a bug that could cause a core dump when making a copy of an OESubSearch instance that contains atom or bond stereo.
Minor bug fixes ——————————————————————————–^
Fixed a segmentation fault when calling either
OEIsCommonIsotope
orOEGetIsotopicWeight
with both atomic number and atomic mass of zero. If everOEIsCommonIsotope
is called with a mass of zero (for any element) it now returns false, and wheneverOEGetIsotopicWeight
is called with a mass of zero, it now returns the corresponding isotopically averaged atomic weight, i.e. viaOEGetAverageWeight
.The OEMatch class was missing an explicit assignment operator, which could cause memory corruption if one OEMatch was ever assigned to another. This has now been implemented.
Improved OEChem’s
OEDetermineConnectivity
functionality to restrict proximity-based bonding of hydrogen atoms preferably to their nearest suitable heavy (non-hydrogen) neighbor. Previously, hydrogens only bonded to their nearest neighbor, which for all-atom molecules with bad clashes caused the overlapping protons to sublimate as molecular hydrogen, leaving their original parents in strange charge (or radical) states.The generation of
@TRIPOS<SUBSTRUCTURE>
records in Sybyl.mol2
files has been rewritten to ensure that ligands, solvent molecules and nonstandard amino acids are correctly placed in their own Tripos substructure. Previously, PDBHETATM
s would be placed in substructure 1, sharing it with a validRESIDUE
. Each OEResidue is now allocated a unique Tripos substructure, and nonstandard (or unrecognized) residues are marked asGROUP
.The geometry functions
OESetAngle
andOESetDistance
have both been made more robust to molecules without coordinates (and zero bond lengths).A refactoring of the SMILES generation routines in the OEChem source code means that the non-canonical SMILES created by the function
OECreateAbsSmiString
are now identical to those created byOECreateSmiString
with just theOESMILESFlag::AtomMaps
andOESMILESFlag::RGroups
flags.Tweaks
OEDetermineConnectivity
to avoid generating bonds between atoms in alternate locations/conformations. This is only a problem for PDB files read with theALL
input flavor. There are still multiple bonds between invariant hinge atoms and the multiple copies of its neighbors in alternate conformations.Fixed a potential performance problem in OEMolBase’s OEChem::OEMolBase::operator+=, and the equivalent
OEAddMols
function calls, when concatenating large molecules with coordinates.The performance of reading MDL SD files containing a large quantity of SD tag data and for PDB files containing a large amount of header information (with the
DATA
flavor) has been improved. Instead of attaching each data item to the molecule as it’s encountered, the file format readers now accumulate the data first, and then attach it to the molecule on encountering the end of the connection table.The performance of handling generic data tags when reading OEB files containing large numbers of atoms or bonds has been improved.
The consistency of file format flavors have been improved. The SMILES
OEOFlavor::SMI::ExtBonds
flavor that was previously only available to theOEFormat::SMI
file format, is now also available to theOEFormat::CAN
andOEFormat::ISM
formats. Likewise, the flavors available to theOEFormat::MOL2
andOEFormat::MOL2H
file formats have been synchronized, withOEFormat::MOL2H
becoming a flavor ofOEFormat::MOL2
(i.e. the file extension effectively specifies a different default flavor).The OEMCSMaxAtomsCompleteCycles objective function requires that ring atoms and bonds of the query molecule have been perceived (using
OEFindRingAtomsAndBonds
) before the corresponding OEMCSSearch instance is constructed. To avoid unexpected behavior, the OEMCSSearch constructors now callOEFindRingAtomsAndBonds
themselves if allowed to make a copy of the query molecule (the default), or issue a warning toOEThrow
otherwise.
OESystem 1.3.4¶
New Features ——————————————————————————–^
New OEMath template functions
OEGeom3DGetCenterAndExtents
andOEGeom3DGetCenterOfMass
have been added to calculate the center, extents and (weighted) center of mass of a set of 3D coordinates.The OEInterface class now has new
OEInterface::GetTypedParameter
template member functions.A new function
OEGetCenterAndExtents
has been added to OESystem’s grid handling code, to retrieve the center and extents of a grid.
Minor bug fixes ——————————————————————————–^
A complete new implementation of OEConcatIter to avoid potential problems caused by the fact that appending items to an STL
std::vector
invalidates iterators over it. The new implementation uses offsets rather than pointers to avoid problems. This also fixes a crash ofOEConcatIter::operator++
on an empty iterator.Fixed a bug in
OEIter::Push
that caused problems if the iterator was previously empty.Fixed a bug in
OEFileExtension
that was causing crashes when no extension was present.Fixed a bug in
OEInterface::GetParameters
that caused parameters in sub sub interfaces to appear multiple times in the returned iterator.The
OEWriteSettings
function now takes a const OEInterface reference.
OEPlatform 1.3.4¶
New Features ——————————————————————————–^
New functions
OEFileDetermineName
andOEFileDeterminePath
to extract the basename and path of a filename respectively.
Minor bug fixes ——————————————————————————–^
Fixed a problem in the oeigzstream constructor, that could cause problems determining the size of a file using
size
, as zlib was not being correctly initialized.Fixed a minor bug in
OEFileCreate
that was failing to close the file descriptor for the newly created file.The return type of the
OEFile::Size
method and theOEFileSize
function have been changed fromsize_t
tooefpos_t
to allow correct handling of large files on 32-bit platforms.Fixed some minor bugs in oeistream and oeostream when these classes are used directly.