File: gettingstarted.rst

package info (click to toggle)
python-cirpy 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: python: 429; makefile: 165
file content (88 lines) | stat: -rw-r--r-- 2,417 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.. _gettingstarted:

Getting started
===============

This page gives a introduction on how to get started with CIRpy. Before we start, make sure you have
:ref:`installed CIRpy <install>`.

Basic usage
-----------

The simplest way to use CIRpy is with the ``resolve`` function::

    >>> import cirpy
    >>> cirpy.resolve('Aspirin', 'smiles')
    'C1=CC=CC(=C1C(O)=O)OC(C)=O'

The first parameter is the input string and the second parameter is the desired output representation. The main
output representations for the second parameter are::

    stdinchi
    stdinchikey
    inchi
    smiles
    ficts
    ficus
    uuuuu
    hashisy
    sdf
    names
    iupac_name
    cas
    formula

All return a string, apart from ``names`` and ``cas``, which return a list of strings.

File formats
------------

Output can additionally be returned in a variety of file formats that are specified using the second parameter in the
same way::

    >>> cirpy.resolve('c1ccccc1', 'cif')
    "data_C6H6\n#\n_chem_comp.id\t'C6H6'\n#\nloop_\n_chem_comp_atom.comp_id\n..."

The full list of file formats::

    alc         # Alchemy format
    cdxml       # CambridgeSoft ChemDraw XML format
    cerius      # MSI Cerius II format
    charmm      # Chemistry at HARvard Macromolecular Mechanics file format
    cif         # Crystallographic Information File
    cml         # Chemical Markup Language
    ctx         # Gasteiger Clear Text format
    gjf         # Gaussian input data file
    gromacs     # GROMACS file format
    hyperchem   # HyperChem file format
    jme         # Java Molecule Editor format
    maestro     # Schroedinger MacroModel structure file format
    mol         # Symyx molecule file
    mol2        # Tripos Sybyl MOL2 format
    mrv         # ChemAxon MRV format
    pdb         # Protein Data Bank
    sdf3000     # Symyx Structure Data Format 3000
    sln         # SYBYL Line Notation
    xyz         # xyz file format

Properties
----------

A number of calculated structure-based properties can be returned, also specified using the second parameter::

    >>> cirpy.resolve('coumarin 343', 'h_bond_acceptor_count')
    '5'


The full list of properties::

    mw                           # (Molecular weight)
    h_bond_donor_count
    h_bond_acceptor_count
    h_bond_center_count
    rule_of_5_violation_count
    rotor_count
    effective_rotor_count
    ring_count
    ringsys_count