uk.ac.cam.ch.wwmm.opsin
Class NameToStructureConfig

java.lang.Object
  extended by uk.ac.cam.ch.wwmm.opsin.NameToStructureConfig
All Implemented Interfaces:
java.lang.Cloneable

public class NameToStructureConfig
extends java.lang.Object
implements java.lang.Cloneable

Allows OPSIN to be configured e.g. enable processing of radicals Example usage: NameToStructureConfig n2sConfig = new NameToStructureConfig(); n2sconfig.setAllowRadicals(true); nts.parseChemicalName(chemicalName, n2sConfig) where nts is an instance of NameToStructure


Constructor Summary
NameToStructureConfig()
          Constructs a NameToStructureConfig with default settings: allowRadicals = false outputRadicalsAsWildCardAtoms = false detailedFailureAnalysis = false
 
Method Summary
 NameToStructureConfig clone()
           
static NameToStructureConfig getDefaultConfigInstance()
          Constructs a NameToStructureConfig with default settings: allowRadicals = false detailedFailureAnalysis = false
 boolean isAllowRadicals()
          Are radicals allowed? e.g.
 boolean isDetailedFailureAnalysis()
          Should OPSIN attempt reverse parsing to more accurately determine why parsing failed
 boolean isOutputRadicalsAsWildCardAtoms()
          Are radicals output as wildcard atoms e.g.
 void setAllowRadicals(boolean allowRadicals)
          Sets whether radicals allowed? e.g.
 void setDetailedFailureAnalysis(boolean detailedFailureAnalysis)
          Sets whether OPSIN should attempt reverse parsing to more accurately determine why parsing failed
 void setOutputRadicalsAsWildCardAtoms(boolean outputRadicalsAsWildCardAtoms)
          Should radicals be output as wildcard atoms e.g.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameToStructureConfig

public NameToStructureConfig()
Constructs a NameToStructureConfig with default settings: allowRadicals = false outputRadicalsAsWildCardAtoms = false detailedFailureAnalysis = false

Method Detail

isAllowRadicals

public boolean isAllowRadicals()
Are radicals allowed? e.g. should fragments such as phenyl be interpretable

Returns:

setAllowRadicals

public void setAllowRadicals(boolean allowRadicals)
Sets whether radicals allowed? e.g. should fragments such as phenyl be interpretable


isOutputRadicalsAsWildCardAtoms

public boolean isOutputRadicalsAsWildCardAtoms()
Are radicals output as wildcard atoms e.g. [*]CC for ethyl

Returns:

setOutputRadicalsAsWildCardAtoms

public void setOutputRadicalsAsWildCardAtoms(boolean outputRadicalsAsWildCardAtoms)
Should radicals be output as wildcard atoms e.g. [*]CC for ethyl Note that if this is set to true InChIs cannot be generated

Parameters:
outputRadicalsAsWildCardAtoms -

isDetailedFailureAnalysis

public boolean isDetailedFailureAnalysis()
Should OPSIN attempt reverse parsing to more accurately determine why parsing failed

Returns:

setDetailedFailureAnalysis

public void setDetailedFailureAnalysis(boolean detailedFailureAnalysis)
Sets whether OPSIN should attempt reverse parsing to more accurately determine why parsing failed


getDefaultConfigInstance

public static NameToStructureConfig getDefaultConfigInstance()
Constructs a NameToStructureConfig with default settings: allowRadicals = false detailedFailureAnalysis = false


clone

public NameToStructureConfig clone()
Overrides:
clone in class java.lang.Object