public static final class OrganicMoleculeBuilder.Substituent
extends java.lang.Object
Constructor and Description |
---|
Substituent() |
Modifier and Type | Method and Description |
---|---|
BondedAtom |
attach(BondedAtom coreCarbon)
Builds the substituent and attaches it to the backbone.
|
static OrganicMoleculeBuilder.Substituent |
createAlcohol()
Creates a neutral alcohol (OH) substituent.
|
static OrganicMoleculeBuilder.Substituent |
createAlcohol(int protonation)
Creates an (optionally charged) alcohol substituent.
|
static OrganicMoleculeBuilder.Substituent |
createAlkyl(int length)
Creates an alkyl substituent.
|
static OrganicMoleculeBuilder.Substituent |
createCarbonyl()
Creates a carbonyl (double-bonded O) substituent.
|
static OrganicMoleculeBuilder.Substituent |
createHalogen(ChemicalElement element)
Creates a halogen (single-atom) substituent.
|
int |
getAlkylLength()
Gets how long this alkyl substituent is.
|
ChemicalElement |
getHalogen()
Gets what halogen element this substituent is.
|
OrganicMoleculeBuilder.SubstituentType |
getType()
Gets what kind of substituent this is.
|
int |
getValenceConsumed()
How many bonds this substituent consumes on the backbone carbon it's attached to.
|
public int getValenceConsumed()
public BondedAtom attach(BondedAtom coreCarbon)
coreCarbon
- The core carbon bonded to the substituent.public OrganicMoleculeBuilder.SubstituentType getType()
public int getAlkylLength()
public ChemicalElement getHalogen()
public static OrganicMoleculeBuilder.Substituent createAlkyl(int length)
length
- How many carbons in the alkyl chain.public static OrganicMoleculeBuilder.Substituent createHalogen(ChemicalElement element)
element
- Which element this halogen is.public static OrganicMoleculeBuilder.Substituent createAlcohol()
public static OrganicMoleculeBuilder.Substituent createAlcohol(int protonation)
protonation
- The number of protons on the O, from zero to two.public static OrganicMoleculeBuilder.Substituent createCarbonyl()