Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

OpenBabel functions

Finally, any properties contained in the molfile will be stored in a separate table containing the text value copied from the file as well as a numeric value for the property, if that is appropriate for the property. There will be a one-to-many relationship between the structure and property table, allowing any number of properties to be stored for each structure. The function openbabel.molfile properties is shown in the Appendix. It expects a molfile and returns a composite data type, defined as follows. [Pg.129]

Create Or Replace Function openbabel.valid(smi Text) Returns Boolean As EOPY import openbabel try ... [Pg.198]

Create Or Replace Function openbabel.cansmiles(smi Text) Returns Text As EOPY import openbabel obc = openbabel.OBConversion() mol = openbabel.OBMol() obc.SetlnAndOutFormats("smi", "can") if obc.Readstring(mol, smi) mol.SetTitle("")... [Pg.198]

Create Or Replace Function openbabel.list matches(Text, Text) Returns Integer ] As EOSQL ... [Pg.201]

Create or Replace FUNCTION openbabel.contains(Bit, Bit) Returns Boolean As EOSQL ... [Pg.202]

Create Or Replace Function openbabel.molfile properties(molfil Text) Returns Setof openbabel.named property As EOPY import pybel... [Pg.203]

There is an open-source extension of PostgreSQL called pgchem.7 It uses C functions and OpenBabel. It implements some of the core functions described in Chapter 7. The names of the functions are not the same as the names used here. Using pgchem, it should be possible to perform most of the operations represented by the core functions described in this book. [Pg.121]

There are many programs available to parse the various molecular structure file format. OpenBabel is an open-source program that can read many file formats and produce a SMILES representation of molecular structure. There are many other commercial products that can do this as well. In the following examples, the OpenBabel/plpythonu implementation of molfile parsing will be used. This was introduced in Chapter 10. The code to define the necessary functions is shown in the Appendix. [Pg.125]

The column structure.id is a unique integer relating the structure, sdf and property tables. The sdf.molfile column contains the molfile for each structure as defined by the vendor. The structure.name and structure.cansmiles columns contain the name and canonical smiles parsed and computed from the molfile. The structure.coord column will contain an array of atomic coordinates. The structure, atom column will contain an array of atom numbers from the file in canonical order to correspond to the atom order in the canonical SMILES. The OpenBabel/plpythonu extension functions molfile mol and molfile properties will be used to parse the vendor SDF molfiles and populate these tables. The molfile column of the sdf table is first populated from the SDF file, using the following perl script. [Pg.126]

Notice that the individual elements of the composite data type value returned by the openbabel.molf ile mol function must be used. Lor example, (openbabel.molfile mol (molf ile)). cansmiles... [Pg.128]

This composite type is created when the openbabel schema and its associated functions are created using the code contained in the Appendix. It is not necessary to issue this SQL command again during the processing of the data from the vla-4.sdf file. [Pg.129]

The following SQL is used to parse the molfile column from the vla4.structure table using the openbabel.molfile properties function. The name and value fields of the composite data type are inserted into the vla4. property table, along with the appropriate id selected from the vla4.structure table along with the molfile column. [Pg.129]

Every one of these utilities will first require that a file of structures be loaded into a table in the database. Two methods are shown here importing a SMILES file and a mol file. Other file types could be added as needed, extending the core functions described earlier using mol file mol or molf ile to smiles as a model. OpenBabel is a good choice because of its support of many file formats. [Pg.167]

This Appendix contains structured query language (SQL) functions and tables too large or complex for the explanatory nature of the earlier chapters. These functions and tables are practical, rather than explanatory. They all follow PostgreSQL syntax. Some of them require the core functions described in Chapter 7 of this book, for example, match, cansmiles, and count matches. Those functions are available in the CHORD product from gNova, Inc. This Appendix also contains a PerlMol implementation, a FROWNS implementation, and an OpenBabel implementation of the core functions for PostgreSQL. [Pg.173]

Assume that the code above is stored in a file named openbabel-core.sql. In order to install these functions into a database named mydb, the following linux command would be used. [Pg.203]


See other pages where OpenBabel functions is mentioned: [Pg.202]    [Pg.202]    [Pg.79]    [Pg.85]    [Pg.119]    [Pg.119]    [Pg.128]    [Pg.128]    [Pg.131]    [Pg.133]    [Pg.197]    [Pg.205]   
See also in sourсe #XX -- [ Pg.131 , Pg.132 , Pg.197 ]




SEARCH



Cansmiles function OpenBabel

Contains function OpenBabel

Core function OpenBabel

Extension functions OpenBabel

Matches function OpenBabel

OpenBabel

© 2024 chempedia.info