###############################################
Appendix: Additional Examples in Python
###############################################

These are full listings of programming examples that are excerpted or offered for download in this chapter.
See the full list of examples
:ref:`elsewhere in this chapter <oechem_part_examples>`.

..	_listing-AltlocfactGroupsDoc.py:

.. oe:source:: AltlocfactGroupsDoc.py
   :language: python
   :refnum:   1
   :caption:  Alternate location factory groups

..	_listing-Aromaticity.py:

.. oe:source:: Aromaticity.py
   :language: python
   :refnum:   2
   :caption:  Aromaticity perception with various models

..	_listing-AtomMap.py:

.. oe:source:: AtomMap.py
   :language: python
   :refnum:   3
   :caption:  Substructure search with atom mappings


..	_listing-CompositionFunctorsAtom.py:

.. oe:source:: CompositionFunctorsAtom.py
   :language: python
   :refnum:   4
   :caption:  Combining predefined atom predicates

..	_listing-CompositionFunctorsBond.py:

.. oe:source:: CompositionFunctorsBond.py
   :language: python
   :refnum:   5
   :caption:  Combining predefined bond predicates



..	_listing-ClearAromaticity.py:

.. oe:source:: ClearAromaticity.py
   :language: python
   :refnum:   6
   :caption:  Clearing aromaticity


..	_listing-ResCountDoc.py:

.. oe:source:: ResCountDoc.py
   :language: python
   :refnum:   7
   :caption:  Looping over hierarchical components

..	_listing-DatabaseSubset.py:

.. oe:source:: DatabaseSubset.py
   :language: python
   :refnum:   10
   :caption:  Retrieving a subset of a file





..	_listing-DatabaseExtract.py:

.. oe:source:: DatabaseExtract.py
   :language: python
   :refnum:   11
   :caption:  Extract molecules by title





..	_listing-ManipulateSDData.py:

.. oe:source:: ManipulateSDData.py
   :language: python
   :refnum:   12
   :caption:  SD data manipulation





..	_listing-ThreadedMolFind.py:

.. oe:source:: ThreadedMolFind.py
   :language: python
   :refnum:   13
   :caption:  Using Threaded Input and Output





..	_listing-MultiCoreMolFind.py:

.. oe:source:: MultiCoreMolFind.py
   :language: python
   :refnum:   14
   :caption:  Using multiple threads to read and write to molthreads





..	_listing-PipelineMolFind.py:

.. oe:source:: PipelineMolFind.py
   :language: python
   :refnum:   15
   :caption:  Setting mutexed memory pool mode


..	_listing-ManipulatePDBData.py:

.. oe:source:: ManipulatePDBData.py
   :language: python
   :refnum:   16
   :caption:  PDB data manipulation


..	_listing-SubstructureSearch.py:

.. oe:source:: SubstructureSearch.py
   :language: python
   :refnum:   17
   :caption:  Simple substructure search example

..	_listing-MolFind.py:

.. oe:source:: MolFind.py
   :language: python
   :refnum:   18
   :caption:  Extracting molecules based upon a substructure


..	_listing-SubstructureSearchMatch.py:

.. oe:source:: SubstructureSearchMatch.py
   :language: python
   :refnum:   19
   :caption:  Substructures match for query molecule


..	_listing-Functors.py:

.. oe:source:: Functors.py
   :language: python
   :refnum:   20
   :caption:  Using functor callbacks


..	_listing-FunctorsAtom.py:

.. oe:source:: FunctorsAtom.py
   :language: python
   :refnum:   21
   :caption:  Using predefined atom functors


..	_listing-FunctorsBond.py:

.. oe:source:: FunctorsBond.py
   :language: python
   :refnum:   22
   :caption:  Using predefined bond functors



..	_listing-FunctorsOEMatch.py:

.. oe:source:: FunctorsOEMatch.py
   :language: python
   :refnum:   23
   :caption:  Functor substructure-based matching


..	_listing-FunctorsOEPartPred.py:

.. oe:source:: FunctorsOEPartPred.py
   :language: python
   :refnum:   24
   :caption:  Ring system extraction


..	_listing-FunctorsOESubsetMol.py:

.. oe:source:: FunctorsOESubsetMol.py
   :language: python
   :refnum:   25
   :caption:  Ring system extraction



..	_listing-GenericDataMol.py:

.. oe:source:: GenericDataMol.py
   :language: python
   :refnum:   26
   :caption:  Example of attaching a molecule as generic data


..	_listing-GenericDataMolWeight.py:

.. oe:source:: GenericDataMolWeight.py
   :language: python
   :refnum:   27
   :caption:  Example of using generic data

..	_listing-GenericDataToAtom.py:

.. oe:source:: GenericDataToAtom.py
   :language: python
   :refnum:   28
   :caption:  Example of attaching generic data to atoms


..	_listing-GettingStartedWithOEInterface.py:

.. oe:source:: GettingStartedWithOEInterface.py
   :language: python
   :refnum:   29
   :caption:  Getting started with OEInterface command line parsing


..	_listing-NthMolecule.py:

.. oe:source:: NthMolecule.py
   :language: python
   :refnum:   30
   :caption:  Retrieving the Nth molecule in a file

..	_listing-OEInterfaceMolParam.py:

.. oe:source:: OEInterfaceMolParam.py
   :language: python
   :refnum:   31
   :caption:  Example of using molecule parameter

..	_listing-PerceiveAromRingSystems.py:

.. oe:source:: PerceiveAromRingSystems.py
   :language: python
   :refnum:   32
   :caption:  Aromatic ring system identification


..	_listing-PrintAtomStereo.py:

.. oe:source:: PrintAtomStereo.py
   :language: python
   :refnum:   33
   :caption:  Accessing atom stereo information

..	_listing-PrintBondStereo.py:

.. oe:source:: PrintBondStereo.py
   :language: python
   :refnum:   34
   :caption:  Accessing bond stereo information

..	_listing-PrintCIPAtomStereo.py:

.. oe:source:: PrintCIPAtomStereo.py
   :language: python
   :refnum:   35
   :caption:  Perceiving CIP atom stereo information


..	_listing-PrintCIPBondStereo.py:

.. oe:source:: PrintCIPBondStereo.py
   :language: python
   :refnum:   36
   :caption:  Perceiving CIP bond stereo information


..	_listing-ScalarGridCtor.py:

.. oe:source:: ScalarGridCtor.py
   :language: python
   :refnum:   37
   :caption:  Constructing a scalar grid


..	_listing-SetAtomStereo.py:

.. oe:source:: SetAtomStereo.py
   :language: python
   :refnum:   38
   :caption:  Setting atom stereo information


..	_listing-SetBondStereo.py:

.. oe:source:: SetBondStereo.py
   :language: python
   :refnum:   39
   :caption:  Setting bond stereo information


..	_listing-SimpleResCountDoc.py:

.. oe:source:: SimpleResCountDoc.py
   :language: python
   :refnum:   40
   :caption:  Accessing OEResidue properties



..	_listing-UserPredAtom.py:

.. oe:source:: UserPredAtom.py
   :language: python
   :refnum:   41
   :caption:  User defined atom predicate


..	_listing-UserPredAtomArg.py:

.. oe:source:: UserPredAtomArg.py
   :language: python
   :refnum:   42
   :caption:  User defined atom predicate with state

..	_listing-UserPredBond.py:

.. oe:source:: UserPredBond.py
   :language: python
   :refnum:   43
   :caption:  User defined bond predicate

..	_listing-UsingOEInterfaceDefaults.py:

.. oe:source:: UsingOEInterfaceDefaults.py
   :language: python
   :refnum:   44
   :caption:  Setting a default value for a parameter


..	_listing-UsingOEInterfaceHas.py:

.. oe:source:: UsingOEInterfaceHas.py
   :language: python
   :refnum:   45
   :caption:  Testing for parameter existence with the Has method


..	_listing-UsingOEInterfaceHelp.py:

.. oe:source:: UsingOEInterfaceHelp.py
   :language: python
   :refnum:   46
   :caption:  A program to concatenate any number of molecules together


..	_listing-UsingOEInterfaceKeyless.py:

.. oe:source:: UsingOEInterfaceKeyless.py
   :language: python
   :refnum:   47
   :caption:  Specifying keyless input and output file parameters


..	_listing-UsingOEInterfaceList.py:

.. oe:source:: UsingOEInterfaceList.py
   :language: python
   :refnum:   48
   :caption:  Specifying that a parameter is a list of values

..	_listing-UsingOEInterfaceRequired.py:

.. oe:source:: UsingOEInterfaceRequired.py
   :language: python
   :refnum:   49
   :caption:  Requiring all parameters to be specified.

..	_listing-WriteCSV.py:

.. oe:source:: WriteCSV.py
   :language: python
   :refnum:   50
   :caption:  Writing out SD data as CSV

..	_listing-anisou.py:

..  oe:source:: anisou.py
    :language: python
    :refnum:   51
    :caption:  Print anisotropic B-factors.

..	_listing-appendringdict.py:

..  oe:source:: appendringdict.py
    :language: python
    :refnum:   52
    :caption:  Append 2D ring dictionary.

..	_listing-applytransform.py:

..  oe:source:: applytransform.py
    :language: python
    :refnum:   53
    :caption:  Use a SMIRKS specification to perform individual reaction transformations on single molecules.


..	_listing-applytransformiter.py:

..  oe:source:: applytransformiter.py
    :language: python
    :refnum:   54
    :caption:  Use a SMIRKS specification to perform individual reaction transformations on each input molecule.

..	_listing-basicStyle.py:

..  oe:source:: basicStyle.py
    :language: python
    :refnum:   55
    :caption:  Setting up an OE3DMolStyle on a molecule.


..	_listing-bFactorStyle.py:

..  oe:source:: bFactorStyle.py
    :language: python
    :refnum:   56
    :caption:  OE3DMolStyle focused on B-Factor styling.


..	_listing-cansmi.py:

..  oe:source:: cansmi.py
    :language: python
    :refnum:   57
    :caption:  Generate canonical SMILES.


..	_listing-catmols.py:

..  oe:source:: catmols.py
    :language: python
    :refnum:   58
    :caption:  Concatenating molecules.


..	_listing-cifdata.py:

..  oe:source:: cifdata.py
    :language: python
    :refnum:   59
    :caption:  Creating an OECIFData Object.


..	_listing-cliquealign.py:

..  oe:source:: cliquealign.py
    :language: python
    :refnum:   60
    :caption:  Align molecules by clique match.


..	_listing-convert.py:

..  oe:source:: convert.py
    :language: python
    :refnum:   61
    :caption:  Convert molecules.

..	_listing-createringdict.py:

..  oe:source:: createringdict.py
    :language: python
    :refnum:   62
    :caption:  Create 2D ring dictionary.


..	_listing-csv2sdf.py:

..  oe:source:: csv2sdf.py
    :language: python
    :refnum:   63
    :caption:  Adding CSV data as SD tags.


..	_listing-dots.py:

..  oe:source:: dots.py
    :language: python
    :refnum:   64
    :caption:  Print dots.


..	_listing-extractringtemplates.py:

..  oe:source:: extractringtemplates.py
    :language: python
    :refnum:   65
    :caption:  Extract 2D ring templates.

..	_listing-extractscaffold.py:

..  oe:source:: extractscaffold.py
    :language: python
    :refnum:   66
    :caption:  Extract molecule scaffolds.


..	_listing-generate2D.py:

..  oe:source:: generate2D.py
    :language: python
    :refnum:   67
    :caption:  Generate 2D coordinates with user-defined ring templates.


..	_listing-gettitles.py:

..  oe:source:: gettitles.py
    :language: python
    :refnum:   68
    :caption:  Get molecule titles.


..	_listing-libgen.py:

..  oe:source:: libgen.py
    :language: python
    :refnum:   69
    :caption:  Library generation.


..	_listing-makefastss.py:

..  oe:source:: makefastss.py
    :language: python
    :refnum:   70
    :caption:  Generate database for fast substructure search.



..	_listing-mcs3dalign.py:

..  oe:source:: mcs3dalign.py
    :language: python
    :refnum:   71
    :caption:  Align molecules by maximum common substructure.


..	_listing-minpath.py:

..  oe:source:: minpath.py
    :language: python
    :refnum:   72
    :caption:  Find minimum path in a molecule.


..	_listing-molchunk.py:

..  oe:source:: molchunk.py
    :language: python
    :caption: Split molecule file.
    :refnum: 73


..	_listing-molcount.py:

..  oe:source:: molcount.py
    :language: python
    :caption: Counting molecules.
    :refnum: 74


..	_listing-molextract.py:

..  oe:source:: molextract.py
    :language: python
    :caption: Extract molecules by title.
    :refnum: 75

..	_listing-molgrep.py:

..  oe:source:: molgrep.py
    :language: python
    :caption: Perform substructure searches.
    :refnum: 76


..	_listing-molstats.py:

..  oe:source:: molstats.py
    :language: python
    :caption: Print simple molecule information.
    :refnum: 77


..	_listing-oecheminfo.py:

..  oe:source:: oecheminfo.py
    :language: python
    :caption: Print OEChem and file format information.
    :refnum: 78


..	_listing-options.py:

..  oe:source:: options.py
    :language: python
    :caption: Define parameters.
    :refnum: 79


..	_listing-parts2mols.py:

..  oe:source:: parts2mols.py
    :language: python
    :caption: Splitting multicomponent molecules.
    :refnum: 80


..	_listing-printatomnames.py:

..  oe:source:: printatomnames.py
    :language: python
    :caption: Print molecule atom names.
    :refnum: 81


..	_listing-randomizeatoms.py:

..  oe:source:: randomizeatoms.py
    :language: python
    :caption: Randomize molecules of atom.
    :refnum: 82

..	_listing-randomsample.py:

..  oe:source:: randomsample.py
    :language: python
    :caption: Extract random molecule subset.
    :refnum: 83

..	_listing-ringsubset.py:

..  oe:source:: ringsubset.py
    :language: python
    :caption: Extract rings.
    :refnum: 84

..	_listing-rmsd.py:

..  oe:source:: rmsd.py
    :language: python
    :caption: Align multiconformer molecules.
    :refnum: 85

..	_listing-rotorcount.py:

..  oe:source:: rotorcount.py
    :language: python
    :caption: Print rotor count distribution.
    :refnum: 86

..	_listing-sdf2csv.py:

..  oe:source:: sdf2csv.py
    :language: python
    :caption: Exporting SD data to a CSV file.
    :refnum: 87

..	_listing-sdfilter.py:

..  oe:source:: sdfilter.py
    :language: python
    :caption: Filter molecules by SD data.
    :refnum: 88

..	_listing-sdfmodprops.py:

..  oe:source:: sdfmodprops.py
    :language: python
    :caption: Modifying SD tags.
    :refnum: 89


..	_listing-sdfrename.py:

..  oe:source:: sdfrename.py
    :language: python
    :caption: Renaming molecules by SD field.
    :refnum: 90

..	_listing-searchfastss.py:

..  oe:source:: searchfastss.py
    :language: python
    :caption: Perform SMARTS search on substructure database file.
    :refnum: 91

..	_listing-setchemcomp.py:

..  oe:source:: setchemcomp.py
    :language: python
    :caption: Setting mmCIF Chemical Component Header.
    :refnum: 92

..	_listing-sizefilter.py:

..  oe:source:: sizefilter.py
    :language: python
    :caption: Filter molecules by weight or heavy atom count.
    :refnum: 93

..	_listing-smartsalign.py:

..  oe:source:: smartsalign.py
    :language: python
    :caption: Align molecules by SMARTS match.
    :refnum: 94

..	_listing-stripsalts.py:

..  oe:source:: stripsalts.py
    :language: python
    :caption: Strip salts.
    :refnum: 95

..	_listing-styleHierarchy.py:

..  oe:source:: styleHierarchy.py
    :language: python
    :caption: OE3DMolStyle hierarchy between molecule, conformers, and atoms.
    :refnum: 96

..	_listing-unimolrxn.py:

..  oe:source:: unimolrxn.py
    :language: python
    :caption: Performing a reaction.
    :refnum: 97


..	_listing-uniqinchi.py:

..  oe:source:: uniqinchi.py
    :language: python
    :caption: Write out unique molecules (InChi).
    :refnum: 98


..	_listing-uniqmol.py:

..  oe:source:: uniqmol.py
    :language: python
    :caption: Write out unique molecules (canonical SMILES).
    :refnum: 99
