Package org.helm.notation2.tools
Class BuilderMolecule
java.lang.Object
org.helm.notation2.tools.BuilderMolecule
public final class BuilderMolecule extends Object
class to build molecules for the HELMNotation
- Author:
- hecht
-
Method Summary
Modifier and Type Method Description static List<org.helm.chemtoolkit.AbstractMolecule>buildMoleculefromPolymers(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers, List<org.helm.notation2.parser.notation.connection.ConnectionNotation> connections)method to build molecules for the whole HELMNotationstatic RgroupStructurebuildMoleculefromSinglePolymer(org.helm.notation2.parser.notation.polymer.PolymerNotation polymernotation)method to build a molecule for a single polymerstatic org.helm.chemtoolkit.AbstractMoleculegetMolecule(String smiles)static org.helm.chemtoolkit.AbstractMoleculegetMoleculeForMonomer(Monomer monomer)method to build a molecule for a given monomerstatic org.helm.chemtoolkit.AbstractMoleculemergeRgroups(org.helm.chemtoolkit.AbstractMolecule molecule)method to merge all unused rgroups into a molecule
-
Method Details
-
buildMoleculefromSinglePolymer
public static RgroupStructure buildMoleculefromSinglePolymer(org.helm.notation2.parser.notation.polymer.PolymerNotation polymernotation) throws BuilderMoleculeException, HELM2HandledException, ChemistryExceptionmethod to build a molecule for a single polymer- Parameters:
polymernotation- a single polymer- Returns:
- molecule for the given single polymer
- Throws:
BuilderMoleculeException- if the polymer type is BLOB or unknownHELM2HandledException- if the polymer contains HELM2 featuresChemistryException- if the Chemistry Engine can not be initialized
-
buildMoleculefromPolymers
public static List<org.helm.chemtoolkit.AbstractMolecule> buildMoleculefromPolymers(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers, List<org.helm.notation2.parser.notation.connection.ConnectionNotation> connections) throws BuilderMoleculeException, ChemistryExceptionmethod to build molecules for the whole HELMNotation- Parameters:
polymers- all polymers of the HELMNotationconnections- all connections of the HELMNotation- Returns:
- list of built molecules
- Throws:
BuilderMoleculeException- if HELM2 features were containedChemistryException- if the Chemistry Engine can not be iniialized
-
mergeRgroups
public static org.helm.chemtoolkit.AbstractMolecule mergeRgroups(org.helm.chemtoolkit.AbstractMolecule molecule) throws BuilderMoleculeException, ChemistryExceptionmethod to merge all unused rgroups into a molecule- Parameters:
molecule- input molecule- Returns:
- molecule with all merged unused rgroups
- Throws:
BuilderMoleculeException- if the molecule can't be builtChemistryException- if the Chemistry Engine ca not be initialized
-
getMoleculeForMonomer
public static org.helm.chemtoolkit.AbstractMolecule getMoleculeForMonomer(Monomer monomer) throws BuilderMoleculeException, ChemistryExceptionmethod to build a molecule for a given monomer- Parameters:
monomer- input monomer- Returns:
- generated molecule for the given monomer
- Throws:
BuilderMoleculeException- if the monomer can't be builtChemistryException- if the Chemistry Engine can not be initialized
-
getMolecule
public static org.helm.chemtoolkit.AbstractMolecule getMolecule(String smiles) throws IOException, org.helm.chemtoolkit.CTKException, ChemistryException- Parameters:
smiles- given input smiles- Returns:
- converted smiles into molecule
- Throws:
ChemistryException- if chemistry could not be initializedorg.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKitIOException- if smiles can not be read
-