Class StandardizerWrappers
StandardizerWrapper.
Please note that the ThreadLocal based thread safety fix might lead to unexpected memory leaks when
worker threads invoking the provided wrappers are pooled. To mitigate this problem make the reference to the
wrapper inacessable allowing the garbage collector to free the thread local copies up.
Note that an alternative approach would be to implement a Closeable semantics to allow explicitly freeing
up the copies, however this is currently considered not viable.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StandardizerWrapperWrap basic aromatization.static StandardizerWrapperWrap general aromatization.static StandardizerWrapperWrap loose aromatization.static StandardizerWrapperchainOf(StandardizerWrapper... s) Create a chained wrapper.static StandardizerWrapperfromStandardizer(Standardizer standardizer) Extract actions from aStandardizerinstance.static StandardizerWrapperfromStandardizerConfigXml(String configXml) Wrap aStandardizerwith config XML location.static StandardizerWrapperIdentity standardization.static StandardizerWrapperRemove all explicit H atoms.static StandardizerWrapperRemove small fragments (disconnected components).
-
Method Details
-
fromStandardizerConfigXml
Wrap aStandardizerwith config XML location.The returned wrapper uses
ThreadLocalclones of the suppliedStandardizer. For details seefromStandardizer(chemaxon.standardizer.Standardizer)The returned wrapper is serializable and thread safe. Apart from the
ThreadLocalstorage state it is immutable.- Parameters:
configXml- Configuration file location- Returns:
- Wrapped and initialzied Standardizer
- Throws:
IllegalArgumentException- upon initialization proble,
-
fromStandardizer
Extract actions from aStandardizerinstance.Note that only the following actions are supported:
AromatizeActionmaps toStandardizerWrappers.AromatizeRemoveExplicitHydrogensActionmaps toStandardizerWrappers.RemoveExplicitH
- Parameters:
standardizer- Standardizer to extract enabled actions- Returns:
- Wrapper
- Throws:
IllegalArgumentException- when non supported action found or a not valid (StandardizerAction.isValid()) action found
-
identityStandardizer
Identity standardization.- Returns:
- Wrapper doing nothing
-
chainOf
Create a chained wrapper.- Parameters:
s- Steps- Returns:
- Chained wrapper
-
aromatizeBasic
Wrap basic aromatization.- Returns:
- Wrapper
-
aromatizeGeneral
Wrap general aromatization.- Returns:
- Wrapper
-
aromatizeLoose
Wrap loose aromatization.- Returns:
- Wrapper
-
removeAllExplicitH
Remove all explicit H atoms.Delegates
Hydrogenize.convertExplicitHToImplicit(chemaxon.struc.MoleculeGraph, int)withflagsvalueMolAtom.ALL_Hto remove all explicit H atoms. This includes lonely, h-bonded, isotope, charged and others, for details see documentation ofHydrogenize.convertExplicitHToImplicit(chemaxon.struc.MoleculeGraph, chemaxon.struc.MolAtom[], int, boolean).- Returns:
- Wrapper
-
removeSmallFragments
Remove small fragments (disconnected components).Implicit H atoms are also considered. When multiple largest fragments )having the same size) are found the behavior is not specified currently.
- Returns:
- Wrapper
-