Package org.openscience.cdk.iupac.parser
Class NomParser
java.lang.Object
org.openscience.cdk.iupac.parser.NomParser
- All Implemented Interfaces:
NomParserConstants
Deprecated.
The OPSIN (http://opsin.ch.cam.ac.uk/) tool
offers a more comprehensive alternative to this parsers functionality.
A class partly generated by JavaCC which breaks down the chemical name
into computable subparts and passes these parts to the MoleculeBuilder.
- Author:
- David Robinson (University of Manchester), Bhupinder Sandhu, Stephen Tomkinson
- Keywords:
- IUPAC name
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.Next token.Deprecated.Current token.Deprecated.Generated Token Manager.Fields inherited from interface org.openscience.cdk.iupac.parser.NomParserConstants
A, ACTINIUM, AL, ALUMINIUM, ALUMINO, AMERCIUM, AMIDE, AMINE, AMINO, AN, ANTIMONY, ARSENIC, BARIUM, BERKELIUM, BERYLLIUM, BISMUTH, BOHRIUM, BROMO, BUT, CADMIUM, CALCIUM, CALIFORNIUM, CERIUM, CESIUM, CHLORO, CHROMIUM, COBALT, COMMA, CONSTANT, CONT, COPPER, COS, CURIUM, CYCLO, DASH, DEC, DEFAULT, DI, DIGIT, DO, DUBNIUM, DYSPROSIUM, E, EICOS, EINSTEINIUM, EN, EOF, EOL, ERBIUM, ETH, EUROPIUM, FERMIUM, FLUORO, FRANCIUM, GADOLINIUM, GALLIUM, GERMAINIUM, GOLD, HAFNIUM, HASSIUM, HEN, HENICOS, HEPT, HEX, HOLMIUM, HYDROXY, INDIUM, IODO, IRIDIUM, IRON, LANTHANUM, LAWRENCIUM, LEAD, LITHIUM, LITHO, LUTETIUM, MAGNESIUM, MANGANESE, MECURY, MEITMERIUM, MENDELEVIUM, METH, MOLYBDENUM, NEODYMIUM, NEPTUNIUM, NICKEL, NIOBIUM, NITRILE, NITRO, NOBELIUM, NON, OATE, OCT, OICACID, OL, ONE, OSMIUM, OXO, OYLCHLORIDE, PALLADIUM, PENT, PHENYL, PLATINUM, PLUTONIUM, POLONIUM, POTASSIUM, PRASEODYMIUM, PROMETHIUM, PROP, PROTACTINIUM, RADIUM, RHENIUM, RHODIUM, RUBIDIUM, RUTHENIUM, RUTHERFORDIUM, SANARIUM, SCANDIUM, SEABORGIUM, SELENIUM, SILVER, SODIUM, SPACE, STRONTIUM, TANTALUM, TECHNETIUM, TELLURIUM, TERBIUM, TETR, THALLIUM, THORIUM, THULIUM, TIN, TITANIUM, tokenImage, TRI, TUNGSTEN, UNDEC, URANIUM, VANADIUM, YL, YN, YTTERBIUM, YTTRIUM, ZINC, ZIRCONIUM
-
Constructor Summary
ConstructorsConstructorDescriptionNomParser
(InputStream stream) Deprecated.Constructor with InputStream.NomParser
(InputStream stream, String encoding) Deprecated.Constructor with InputStream and supplied encodingDeprecated.Constructor.Deprecated.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Deprecated.The usual numbers .final void
Deprecated.An attach position has been specified using a comma seperated list followed by a dashfinal void
bondType()
Deprecated.Tokens which affect the bond order of the first bond.final void
Deprecated.A list of known tokens denoting a chain's length.final void
Deprecated.The general form all chemical names must follow.final void
Deprecated.The layout of a functional group(s) which can connect anywhere.final void
Deprecated.Functional groups suffixs for groups which can be connected anywhere along the main chain.final void
cycle()
Deprecated.Deals with cyclic main chains.final void
Deprecated.final void
Deprecated.Disable tracing.final void
Deprecated.Enable tracing.final void
Deprecated.Functional groups which occur at the end of the main chain and need a connecting "an".final void
Deprecated.final void
Deprecated.The functional group part of the prefixstatic IAtomContainer
Deprecated.Parses the chemical name and returns the built molecule.static IAtomContainer
generate
(String stringToParse, IChemObjectBuilder builder) Deprecated.Parses the chemical name and returns the built molecule.Deprecated.Generate ParseException.final Token
Deprecated.Get the next Token.final Token
getToken
(int index) Deprecated.Get the specific Token.final void
Deprecated.final void
Deprecated.final void
Deprecated.Main chains are compulsary and consist of an optional "cyclo", a length prefix and a posfix denoting functional groups.final void
Deprecated.Deal with the main chain's length.final void
Deprecated.Figure out the functional group by the main chain's suffix.final void
Deprecated.Only one attach location specified, should be followed by a dash.final void
Deprecated.final void
Deprecated.Allows 1 or more prefixesfinal void
Deprecated.final void
Deprecated.final void
Deprecated.Things which have sub chains branching off them but the molecule has no main chain.final void
Deprecated.Things which have sub chains branching off them and the molecule does have a main chain.void
ReInit
(InputStream stream) Deprecated.Reinitialise.void
ReInit
(InputStream stream, String encoding) Deprecated.Reinitialise.void
Deprecated.Reinitialise.void
Deprecated.Reinitialise.final void
Deprecated.Deal with special cases where the rules don't apply.final void
subChain()
Deprecated.The substituent part of the prefixfinal void
Deprecated.Deal with fragments refering to the positioning of the base numbers (denoting their magnitude)final void
Deprecated.Deals with numbers above 30 where the base numbers set appear twice.final void
Deprecated.Two or three attach locations specidied, handle the second and if needed, the third one here.
-
Field Details
-
token_source
Deprecated.Generated Token Manager. -
token
Deprecated.Current token. -
jj_nt
Deprecated.Next token.
-
-
Constructor Details
-
NomParser
Deprecated.Constructor with InputStream. -
NomParser
Deprecated.Constructor with InputStream and supplied encoding -
NomParser
Deprecated.Constructor. -
NomParser
Deprecated.Constructor with generated Token Manager.
-
-
Method Details
-
generate
Deprecated.Parses the chemical name and returns the built molecule. It uses theDefaultChemObjectBuilder
to create a data model.- Parameters:
stringToParse
- A case-insensitive name of the chemical to build.- Returns:
- A molecule which represents the interpretation of the name.
- Throws:
ParseException
- Any error which occur in the parsing get wrapped up in a ParseException and thrown.CDKException
-
generate
public static IAtomContainer generate(String stringToParse, IChemObjectBuilder builder) throws ParseException, CDKException Deprecated.Parses the chemical name and returns the built molecule. It uses the givenIChemObjectBuilder
to create a data model.- Parameters:
stringToParse
- A case-insensitive name of the chemical to build.- Returns:
- A molecule which represents the interpretation of the name.
- Throws:
ParseException
- Any error which occur in the parsing get wrapped up in a ParseException and thrown.CDKException
-
completeChemicalName
Deprecated.The general form all chemical names must follow.- Throws:
ParseException
-
prefixConstruct
Deprecated.Allows 1 or more prefixes- Throws:
ParseException
-
prefixType
Deprecated.- Throws:
ParseException
-
subChain
Deprecated.The substituent part of the prefix- Throws:
ParseException
-
attachLocationSpecified
Deprecated.An attach position has been specified using a comma seperated list followed by a dash- Throws:
ParseException
-
oneAttachLocation
Deprecated.Only one attach location specified, should be followed by a dash.- Throws:
ParseException
-
twoOrThreeAttachLocations
Deprecated.Two or three attach locations specidied, handle the second and if needed, the third one here.- Throws:
ParseException
-
chainPrefix
Deprecated.A list of known tokens denoting a chain's length.- Throws:
ParseException
-
specialCase
Deprecated.Deal with special cases where the rules don't apply.- Throws:
ParseException
-
allBaseNumbers
Deprecated.The usual numbers .- Throws:
ParseException
-
tensNoUnits
Deprecated.Deal with fragments refering to the positioning of the base numbers (denoting their magnitude)- Throws:
ParseException
-
tensWithUnits
Deprecated.Deals with numbers above 30 where the base numbers set appear twice. For example, in the tens and the units.- Throws:
ParseException
-
functionalGroupPrefix
Deprecated.The functional group part of the prefix- Throws:
ParseException
-
mainChainConstruct
Deprecated.Main chains are compulsary and consist of an optional "cyclo", a length prefix and a posfix denoting functional groups.- Throws:
ParseException
-
cycle
Deprecated.Deals with cyclic main chains.- Throws:
ParseException
-
mainChainPrefix
Deprecated.Deal with the main chain's length.- Throws:
ParseException
-
bondType
Deprecated.Tokens which affect the bond order of the first bond.- Throws:
ParseException
-
mainChainSuffix
Deprecated.Figure out the functional group by the main chain's suffix.- Throws:
ParseException
-
endFunctionalGroups
Deprecated.Functional groups which occur at the end of the main chain and need a connecting "an".- Throws:
ParseException
-
connectingFunctionalGroupsConstruct
Deprecated.The layout of a functional group(s) which can connect anywhere. No number specified, or a number list specified.- Throws:
ParseException
-
connectingFunctionalGroupSuffix
Deprecated.Functional groups suffixs for groups which can be connected anywhere along the main chain.- Throws:
ParseException
-
prefixFunctionalGroups
Deprecated.- Throws:
ParseException
-
prioritySubstituentsFunGroups
Deprecated.Things which have sub chains branching off them and the molecule does have a main chain.- Throws:
ParseException
-
prioritySubstituents
Deprecated.Things which have sub chains branching off them but the molecule has no main chain.- Throws:
ParseException
-
groupOneMetals
Deprecated.- Throws:
ParseException
-
groupTwoMetals
Deprecated.- Throws:
ParseException
-
dBlockMetals
Deprecated.- Throws:
ParseException
-
pBlockMetals
Deprecated.- Throws:
ParseException
-
fBlockMetals
Deprecated.- Throws:
ParseException
-
ReInit
Deprecated.Reinitialise. -
ReInit
Deprecated.Reinitialise. -
ReInit
Deprecated.Reinitialise. -
ReInit
Deprecated.Reinitialise. -
getNextToken
Deprecated.Get the next Token. -
getToken
Deprecated.Get the specific Token. -
generateParseException
Deprecated.Generate ParseException. -
enable_tracing
public final void enable_tracing()Deprecated.Enable tracing. -
disable_tracing
public final void disable_tracing()Deprecated.Disable tracing.
-