Calculating chemical properties with OrChemOrChem can calculate chemical properties by invoking the CDK. Functions to do this are located in OrChem's PL/SQL package 'orchem_calculate', they take in molecule data and an input type (either 'SMILES' or 'MOL'). There's also an option to have hydrogens added to the molecular input before calculating the property. Examples below.
> desc orchem_calculate
FUNCTION CHARGE RETURNS NUMBER
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
MOLECULE CLOB IN
INPUT_TYPE VARCHAR2 IN
FUNCTION FORMULA RETURNS VARCHAR2
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
MOLECULE CLOB IN
INPUT_TYPE VARCHAR2 IN
ADD_HYDROGENS VARCHAR2 IN
FUNCTION MASS RETURNS NUMBER
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
MOLECULE CLOB IN
INPUT_TYPE VARCHAR2 IN
ADD_HYDROGENS VARCHAR2 IN
|
orchem_calculate.formulaGenerates the chemical formula for a SMILES or Molfile, with or without hydrogens added.Examples:
> select orchem_calculate.formula('O5CCN(CC=3C=1C=CC=CC=1C(=C2C=CC=CC2=3)CN4CCOCC4)CC5','SMILES','Y') as F from dual;
F
-----------------------------------------------------------------------------------------------------------------------------------
C24H28N2O2
> select orchem_calculate.formula('O5CCN(CC=3C=1C=CC=CC=1C(=C2C=CC=CC2=3)CN4CCOCC4)CC5','SMILES','N') as F from dual;
F
-----------------------------------------------------------------------------------------------------------------------------------
C24N2O2
orchem_calculate.massGenerates the mass for a SMILES or Molfile, with or without hydrogens added.Examples:
> select orchem_calculate.formula('C','SMILES','Y') F, orchem_calculate.mass('C','SMILES','Y') M from dual;
F M
-------------------- ----------
CH4 16.0424989
> select orchem_calculate.formula('C','SMILES','N') F, orchem_calculate.mass('C','SMILES','N') M from dual;
F M
-------------------- ----------
C 12.0107359
orchem_calculate.chargeGenerates the charge for a SMILES or Molfile.Examples:
> select orchem_calculate.charge('[O-]C([N+])C([N+])C','SMILES') C from dual;
C
----------
1
> select id, orchem_calculate.charge(molfile,'MOL') as chrg
from orchem_compound_sample
where orchem_calculate.charge(molfile,'MOL') != 0;
ID CHRG
---------- ----------
1051 2
1052 2
1053 2
1055 2
1056 2
1057 -1
........
Back to main page |