mordred


Namemordred JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/mordred-descriptor/mordred
Summarymolecular descriptor calculator
upload_time2019-06-05 18:20:01
maintainer
docs_urlNone
authorHirotomo Moriwaki
requires_python
licenseBSD-3-Clause
keywords qsar chemoinformatics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            mordred
=======
molecular descriptor calculator.

.. image:: https://travis-ci.org/mordred-descriptor/mordred.svg?branch=master
    :target: https://travis-ci.org/mordred-descriptor/mordred

.. image:: https://coveralls.io/repos/github/mordred-descriptor/mordred/badge.svg?branch=master
    :target: https://coveralls.io/github/mordred-descriptor/mordred?branch=master

.. image:: https://codeclimate.com/github/mordred-descriptor/mordred/badges/gpa.svg
   :target: https://codeclimate.com/github/mordred-descriptor/mordred
   :alt: Code Climate

.. image:: https://anaconda.org/mordred-descriptor/mordred/badges/version.svg
    :target: https://anaconda.org/mordred-descriptor/mordred

.. image:: https://img.shields.io/pypi/v/mordred.svg
    :target: https://pypi.python.org/pypi/mordred

.. image:: https://img.shields.io/badge/doi-10.1186%2Fs13321--018--0258--y-blue.svg
   :target: https://doi.org/10.1186/s13321-018-0258-y

.. image:: https://img.shields.io/badge/slack-mordred--descriptor-brightgreen.svg
    :target: https://join.slack.com/t/mordred-descriptor/shared_invite/enQtMzc1MzkyODk1NTY5LTdlYzM4MWUzY2YwZmEwMWYzN2M4YTVkMGRlMDY0ZjU2NjQ1M2RiYzllMzVjZGE4NGZkNWZjODBjODE0YmExNjk

number of descriptors
---------------------
.. code:: python

    >>> from mordred import Calculator, descriptors
    >>> n_all = len(Calculator(descriptors, ignore_3D=False).descriptors)
    >>> n_2D = len(Calculator(descriptors, ignore_3D=True).descriptors)
    >>> print("2D:    {:5}\n3D:    {:5}\n------------\ntotal: {:5}".format(n_2D, n_all - n_2D, n_all))
    2D:     1613
    3D:      213
    ------------
    total:  1826

Installation
------------

conda(recommended)
~~~~~~~~~~~~~~~~~~
#. install conda

       -  `miniconda <http://conda.pydata.org/miniconda.html>`__
       -  `anaconda <https://www.continuum.io/why-anaconda>`__

#. install mordred

       .. code:: console

           $ conda install -c rdkit -c mordred-descriptor mordred

pip
~~~

#. install `rdkit <http://www.rdkit.org/>`__ python package
#. install mordred

       .. code:: console

           $ pip install 'mordred[full]'  # install with extra requires
           # or
           $ pip install mordred
           
Testing the installation
------------------------

            $ python -m mordred.tests

examples
--------

as command
~~~~~~~~~~

calculate all descriptors

.. code:: console

    $ python -m mordred example.smi
    name,ECIndex,WPath,WPol,Zagreb1, (snip)
    benzene,36,27,3,24.0, (snip)
    chrolobenzene,45,42,5,30.0, (snip)


save to file (display progress bar)

.. code:: console

    $ python -m mordred example.smi -o example.csv
    50%|███████████████████████████████████████▌                                       | 1/2 [00:00<00:00,  7.66it/s]


stream read (low memory, no number of molecules information)

.. code:: console

    $ python -m mordred example.smi -s -o example.csv
    0it [00:00, ?it/s]

only ABCIndex

.. code:: console

    $ python -m mordred example.smi -d ABCIndex
    name,ABC,ABCGG
    benzene,4.242640687119286,3.9999999999999996
    chlorobenzene,5.059137268047012,4.785854275382693

ABCIndex and AcidBase

.. code:: console

    $ python -m mordred example.smi -d ABCIndex -d AcidBase
    name,ABC,ABCGG,nAcid,nBase
    benzene,4.242640687119286,3.9999999999999996,0,0
    chlorobenzene,5.059137268047012,4.785854275382693,0,0

multiple input

.. code:: console

    $ python -m mordred example.smi example2.smi -d ABCIndex
    name,ABC,ABCGG
    benzene,4.242640687119286,3.9999999999999996
    chlorobenzene,5.059137268047012,4.785854275382693
    pentane,2.8284271247461903,3.1462643699419726

show help

.. code:: console

    $ python -m mordred --help
    usage: python -m mordred [-h] [--version] [-t {auto,sdf,mol,smi}] [-o OUTPUT]
                             [-p PROCESSES] [-q] [-s] [-d DESC] [-3] [-v]
                             INPUT [INPUT ...]

    positional arguments:
      INPUT

    optional arguments:
      -h, --help            show this help message and exit
      --version             input molecular file
      -t {auto,sdf,mol,smi}, --type {auto,sdf,mol,smi}
                            input filetype (default: auto)
      -o OUTPUT, --output OUTPUT
                            output file path (default: stdout)
      -p PROCESSES, --processes PROCESSES
                            number of processes (default: number of logical
                            processors)
      -q, --quiet           hide progress bar
      -s, --stream          stream read
      -d DESC, --descriptor DESC
                            descriptors to calculate (default: all)
      -3, --3D              use 3D descriptors (require sdf or mol file)
      -v, --verbosity       verbosity

    descriptors: ABCIndex AcidBase AdjacencyMatrix Aromatic AtomCount
    Autocorrelation BalabanJ BaryszMatrix BCUT BertzCT BondCount CarbonTypes Chi
    Constitutional CPSA DetourMatrix DistanceMatrix EccentricConnectivityIndex
    EState ExtendedTopochemicalAtom FragmentComplexity Framework GeometricalIndex
    GravitationalIndex HydrogenBond InformationContent KappaShapeIndex Lipinski
    McGowanVolume MoeType MolecularDistanceEdge MolecularId MomentOfInertia MoRSE
    PathCount Polarizability RingCount RotatableBond SLogP TopologicalCharge
    TopologicalIndex TopoPSA VdwVolumeABC VertexAdjacencyInformation WalkCount
    Weight WienerIndex ZagrebIndex

as library
^^^^^^^^^^

.. code:: python

    >>> from rdkit import Chem
    >>> from mordred import Calculator, descriptors

    # create descriptor calculator with all descriptors
    >>> calc = Calculator(descriptors, ignore_3D=True)

    >>> len(calc.descriptors)
    1613

    >>> len(Calculator(descriptors, ignore_3D=True, version="1.0.0"))
    1612

    # calculate single molecule
    >>> mol = Chem.MolFromSmiles('c1ccccc1')
    >>> calc(mol)[:3]
    [4.242640687119286, 3.9999999999999996, 0]

    # calculate multiple molecule
    >>> mols = [Chem.MolFromSmiles(smi) for smi in ['c1ccccc1Cl', 'c1ccccc1O', 'c1ccccc1N']]

    # as pandas
    >>> df = calc.pandas(mols)
    >>> df['SLogP']
    0    2.3400
    1    1.3922
    2    1.2688
    Name: SLogP, dtype: float64

see `examples <https://github.com/mordred-descriptor/mordred/tree/develop/examples>`_

Citation
--------
Moriwaki H, Tian Y-S, Kawashita N, Takagi T (2018) Mordred: a molecular descriptor calculator. Journal of Cheminformatics 10:4 . doi: `10.1186/s13321-018-0258-y <https://doi.org/10.1186/s13321-018-0258-y>`__

Documentation
-------------

-  `master <http://mordred-descriptor.github.io/documentation/master>`__
-  `develop <http://mordred-descriptor.github.io/documentation/develop>`__

-  `v1.1.0 <http://mordred-descriptor.github.io/documentation/v1.1.1>`__
-  `v1.0.0 <http://mordred-descriptor.github.io/documentation/v1.0.0>`__
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mordred-descriptor/mordred",
    "name": "mordred",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "QSAR chemoinformatics",
    "author": "Hirotomo Moriwaki",
    "author_email": "philopon.dependence@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/93/3d/26c908ece761adafcea06320bf8fe73f4de69979273fb164226dc6038c39/mordred-1.2.0.tar.gz",
    "platform": "any",
    "description": "mordred\n=======\nmolecular descriptor calculator.\n\n.. image:: https://travis-ci.org/mordred-descriptor/mordred.svg?branch=master\n    :target: https://travis-ci.org/mordred-descriptor/mordred\n\n.. image:: https://coveralls.io/repos/github/mordred-descriptor/mordred/badge.svg?branch=master\n    :target: https://coveralls.io/github/mordred-descriptor/mordred?branch=master\n\n.. image:: https://codeclimate.com/github/mordred-descriptor/mordred/badges/gpa.svg\n   :target: https://codeclimate.com/github/mordred-descriptor/mordred\n   :alt: Code Climate\n\n.. image:: https://anaconda.org/mordred-descriptor/mordred/badges/version.svg\n    :target: https://anaconda.org/mordred-descriptor/mordred\n\n.. image:: https://img.shields.io/pypi/v/mordred.svg\n    :target: https://pypi.python.org/pypi/mordred\n\n.. image:: https://img.shields.io/badge/doi-10.1186%2Fs13321--018--0258--y-blue.svg\n   :target: https://doi.org/10.1186/s13321-018-0258-y\n\n.. image:: https://img.shields.io/badge/slack-mordred--descriptor-brightgreen.svg\n    :target: https://join.slack.com/t/mordred-descriptor/shared_invite/enQtMzc1MzkyODk1NTY5LTdlYzM4MWUzY2YwZmEwMWYzN2M4YTVkMGRlMDY0ZjU2NjQ1M2RiYzllMzVjZGE4NGZkNWZjODBjODE0YmExNjk\n\nnumber of descriptors\n---------------------\n.. code:: python\n\n    >>> from mordred import Calculator, descriptors\n    >>> n_all = len(Calculator(descriptors, ignore_3D=False).descriptors)\n    >>> n_2D = len(Calculator(descriptors, ignore_3D=True).descriptors)\n    >>> print(\"2D:    {:5}\\n3D:    {:5}\\n------------\\ntotal: {:5}\".format(n_2D, n_all - n_2D, n_all))\n    2D:     1613\n    3D:      213\n    ------------\n    total:  1826\n\nInstallation\n------------\n\nconda(recommended)\n~~~~~~~~~~~~~~~~~~\n#. install conda\n\n       -  `miniconda <http://conda.pydata.org/miniconda.html>`__\n       -  `anaconda <https://www.continuum.io/why-anaconda>`__\n\n#. install mordred\n\n       .. code:: console\n\n           $ conda install -c rdkit -c mordred-descriptor mordred\n\npip\n~~~\n\n#. install `rdkit <http://www.rdkit.org/>`__ python package\n#. install mordred\n\n       .. code:: console\n\n           $ pip install 'mordred[full]'  # install with extra requires\n           # or\n           $ pip install mordred\n           \nTesting the installation\n------------------------\n\n            $ python -m mordred.tests\n\nexamples\n--------\n\nas command\n~~~~~~~~~~\n\ncalculate all descriptors\n\n.. code:: console\n\n    $ python -m mordred example.smi\n    name,ECIndex,WPath,WPol,Zagreb1, (snip)\n    benzene,36,27,3,24.0, (snip)\n    chrolobenzene,45,42,5,30.0, (snip)\n\n\nsave to file (display progress bar)\n\n.. code:: console\n\n    $ python -m mordred example.smi -o example.csv\n    50%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258c                                       | 1/2 [00:00<00:00,  7.66it/s]\n\n\nstream read (low memory, no number of molecules information)\n\n.. code:: console\n\n    $ python -m mordred example.smi -s -o example.csv\n    0it [00:00, ?it/s]\n\nonly ABCIndex\n\n.. code:: console\n\n    $ python -m mordred example.smi -d ABCIndex\n    name,ABC,ABCGG\n    benzene,4.242640687119286,3.9999999999999996\n    chlorobenzene,5.059137268047012,4.785854275382693\n\nABCIndex and AcidBase\n\n.. code:: console\n\n    $ python -m mordred example.smi -d ABCIndex -d AcidBase\n    name,ABC,ABCGG,nAcid,nBase\n    benzene,4.242640687119286,3.9999999999999996,0,0\n    chlorobenzene,5.059137268047012,4.785854275382693,0,0\n\nmultiple input\n\n.. code:: console\n\n    $ python -m mordred example.smi example2.smi -d ABCIndex\n    name,ABC,ABCGG\n    benzene,4.242640687119286,3.9999999999999996\n    chlorobenzene,5.059137268047012,4.785854275382693\n    pentane,2.8284271247461903,3.1462643699419726\n\nshow help\n\n.. code:: console\n\n    $ python -m mordred --help\n    usage: python -m mordred [-h] [--version] [-t {auto,sdf,mol,smi}] [-o OUTPUT]\n                             [-p PROCESSES] [-q] [-s] [-d DESC] [-3] [-v]\n                             INPUT [INPUT ...]\n\n    positional arguments:\n      INPUT\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --version             input molecular file\n      -t {auto,sdf,mol,smi}, --type {auto,sdf,mol,smi}\n                            input filetype (default: auto)\n      -o OUTPUT, --output OUTPUT\n                            output file path (default: stdout)\n      -p PROCESSES, --processes PROCESSES\n                            number of processes (default: number of logical\n                            processors)\n      -q, --quiet           hide progress bar\n      -s, --stream          stream read\n      -d DESC, --descriptor DESC\n                            descriptors to calculate (default: all)\n      -3, --3D              use 3D descriptors (require sdf or mol file)\n      -v, --verbosity       verbosity\n\n    descriptors: ABCIndex AcidBase AdjacencyMatrix Aromatic AtomCount\n    Autocorrelation BalabanJ BaryszMatrix BCUT BertzCT BondCount CarbonTypes Chi\n    Constitutional CPSA DetourMatrix DistanceMatrix EccentricConnectivityIndex\n    EState ExtendedTopochemicalAtom FragmentComplexity Framework GeometricalIndex\n    GravitationalIndex HydrogenBond InformationContent KappaShapeIndex Lipinski\n    McGowanVolume MoeType MolecularDistanceEdge MolecularId MomentOfInertia MoRSE\n    PathCount Polarizability RingCount RotatableBond SLogP TopologicalCharge\n    TopologicalIndex TopoPSA VdwVolumeABC VertexAdjacencyInformation WalkCount\n    Weight WienerIndex ZagrebIndex\n\nas library\n^^^^^^^^^^\n\n.. code:: python\n\n    >>> from rdkit import Chem\n    >>> from mordred import Calculator, descriptors\n\n    # create descriptor calculator with all descriptors\n    >>> calc = Calculator(descriptors, ignore_3D=True)\n\n    >>> len(calc.descriptors)\n    1613\n\n    >>> len(Calculator(descriptors, ignore_3D=True, version=\"1.0.0\"))\n    1612\n\n    # calculate single molecule\n    >>> mol = Chem.MolFromSmiles('c1ccccc1')\n    >>> calc(mol)[:3]\n    [4.242640687119286, 3.9999999999999996, 0]\n\n    # calculate multiple molecule\n    >>> mols = [Chem.MolFromSmiles(smi) for smi in ['c1ccccc1Cl', 'c1ccccc1O', 'c1ccccc1N']]\n\n    # as pandas\n    >>> df = calc.pandas(mols)\n    >>> df['SLogP']\n    0    2.3400\n    1    1.3922\n    2    1.2688\n    Name: SLogP, dtype: float64\n\nsee `examples <https://github.com/mordred-descriptor/mordred/tree/develop/examples>`_\n\nCitation\n--------\nMoriwaki H, Tian Y-S, Kawashita N, Takagi T (2018) Mordred: a molecular descriptor calculator. Journal of Cheminformatics 10:4 . doi: `10.1186/s13321-018-0258-y <https://doi.org/10.1186/s13321-018-0258-y>`__\n\nDocumentation\n-------------\n\n-  `master <http://mordred-descriptor.github.io/documentation/master>`__\n-  `develop <http://mordred-descriptor.github.io/documentation/develop>`__\n\n-  `v1.1.0 <http://mordred-descriptor.github.io/documentation/v1.1.1>`__\n-  `v1.0.0 <http://mordred-descriptor.github.io/documentation/v1.0.0>`__",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "molecular descriptor calculator",
    "version": "1.2.0",
    "split_keywords": [
        "qsar",
        "chemoinformatics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "933d26c908ece761adafcea06320bf8fe73f4de69979273fb164226dc6038c39",
                "md5": "c8a4f3fd98427387a45ce6047da0f2c4",
                "sha256": "1115f9f3a3dde290dd68d51a5070fce43a62aab96b980cffc9d72b74a59e1c5a"
            },
            "downloads": -1,
            "filename": "mordred-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c8a4f3fd98427387a45ce6047da0f2c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 128774,
            "upload_time": "2019-06-05T18:20:01",
            "upload_time_iso_8601": "2019-06-05T18:20:01.267962Z",
            "url": "https://files.pythonhosted.org/packages/93/3d/26c908ece761adafcea06320bf8fe73f4de69979273fb164226dc6038c39/mordred-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-06-05 18:20:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "mordred-descriptor",
    "github_project": "mordred",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mordred"
}
        
Elapsed time: 0.03176s