mordredcommunity


Namemordredcommunity JSON
Version 2.0.6 PyPI version JSON
download
home_pageNone
SummaryCommunity-Maintained Version of mordred
upload_time2024-07-08 14:27:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mordred-community
Community maintained version of the [mordred molecular descriptor calculator](https://github.com/mordred-descriptor/mordred) which is no longer maintained.

We are accepting pull requests and looking for maintainers!
Reach out on the Issues page if you are interested in helping out!

## Installation
`mordredcommunity` is currently available on PyPI with `pip install mordredcommunity` or via the conda package manager with `conda install -c conda-forge mordredcommunity`.

`mordredcommunity` supports Python 3.8 and newer on all platforms.

To add support for `pandas` and progress bars, use PyPI and call `pip install mordredcommunity[full]`.

Usage of `mordredcommunity` is the same as `mordred`.

## Packages using `mordredcommunity`
 - `mordred-gui` ([github.com/research11111/mordred-gui](https://github.com/research11111/mordred-gui)): Graphical user interface wrapper to `mordredcommunity`

## Number of Descriptors

```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
```

# Examples

## calculate all descriptors

```python
$ 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)

```python
$ 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)

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

## only ABCIndex

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

## ABCIndex and AcidBase

```python
$ 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

```python
$ 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

```python
$ 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

```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
```

## Additional Examples
see [examples](https://github.com/JacksonBurns/mordred-community/tree/main/examples) on GitHub.

# Citation
Please cite the original publication describing `mordred` _and_ this repository specifically.
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)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mordredcommunity",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Jackson Burns <jwburns@mit.edu>",
    "download_url": "https://files.pythonhosted.org/packages/63/8a/5abd14239ee48511de1d14f7ed3ea01b226cf5d3cb7189b125be87e83d88/mordredcommunity-2.0.6.tar.gz",
    "platform": null,
    "description": "# mordred-community\nCommunity maintained version of the [mordred molecular descriptor calculator](https://github.com/mordred-descriptor/mordred) which is no longer maintained.\n\nWe are accepting pull requests and looking for maintainers!\nReach out on the Issues page if you are interested in helping out!\n\n## Installation\n`mordredcommunity` is currently available on PyPI with `pip install mordredcommunity` or via the conda package manager with `conda install -c conda-forge mordredcommunity`.\n\n`mordredcommunity` supports Python 3.8 and newer on all platforms.\n\nTo add support for `pandas` and progress bars, use PyPI and call `pip install mordredcommunity[full]`.\n\nUsage of `mordredcommunity` is the same as `mordred`.\n\n## Packages using `mordredcommunity`\n - `mordred-gui` ([github.com/research11111/mordred-gui](https://github.com/research11111/mordred-gui)): Graphical user interface wrapper to `mordredcommunity`\n\n## Number of Descriptors\n\n```python\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))\n2D:     1613\n3D:      213\n------------\ntotal:  1826\n```\n\n# Examples\n\n## calculate all descriptors\n\n```python\n$ python -m mordred example.smi\nname,ECIndex,WPath,WPol,Zagreb1, (snip)\nbenzene,36,27,3,24.0, (snip)\nchrolobenzene,45,42,5,30.0, (snip)\n```\n\n\n## save to file (display progress bar)\n\n```python\n$ python -m mordred example.smi -o example.csv\n50%|\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\n## stream read (low memory, no number of molecules information)\n\n```python\n$ python -m mordred example.smi -s -o example.csv\n0it [00:00, ?it/s]\n```\n\n## only ABCIndex\n\n```python\n$ python -m mordred example.smi -d ABCIndex\nname,ABC,ABCGG\nbenzene,4.242640687119286,3.9999999999999996\nchlorobenzene,5.059137268047012,4.785854275382693\n```\n\n## ABCIndex and AcidBase\n\n```python\n$ python -m mordred example.smi -d ABCIndex -d AcidBase\nname,ABC,ABCGG,nAcid,nBase\nbenzene,4.242640687119286,3.9999999999999996,0,0\nchlorobenzene,5.059137268047012,4.785854275382693,0,0\n```\n\n## multiple input\n\n```python\n$ python -m mordred example.smi example2.smi -d ABCIndex\nname,ABC,ABCGG\nbenzene,4.242640687119286,3.9999999999999996\nchlorobenzene,5.059137268047012,4.785854275382693\npentane,2.8284271247461903,3.1462643699419726\n```\n\n## show help\n\n```python\n$ python -m mordred --help\nusage: 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\npositional arguments:\n    INPUT\n\noptional 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\ndescriptors: ABCIndex AcidBase AdjacencyMatrix Aromatic AtomCount\nAutocorrelation BalabanJ BaryszMatrix BCUT BertzCT BondCount CarbonTypes Chi\nConstitutional CPSA DetourMatrix DistanceMatrix EccentricConnectivityIndex\nEState ExtendedTopochemicalAtom FragmentComplexity Framework GeometricalIndex\nGravitationalIndex HydrogenBond InformationContent KappaShapeIndex Lipinski\nMcGowanVolume MoeType MolecularDistanceEdge MolecularId MomentOfInertia MoRSE\nPathCount Polarizability RingCount RotatableBond SLogP TopologicalCharge\nTopologicalIndex TopoPSA VdwVolumeABC VertexAdjacencyInformation WalkCount\nWeight WienerIndex ZagrebIndex\n```\n\n## as library\n\n```python\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)\n1613\n\n>>> len(Calculator(descriptors, ignore_3D=True, version=\"1.0.0\"))\n1612\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']\n0    2.3400\n1    1.3922\n2    1.2688\nName: SLogP, dtype: float64\n```\n\n## Additional Examples\nsee [examples](https://github.com/JacksonBurns/mordred-community/tree/main/examples) on GitHub.\n\n# Citation\nPlease cite the original publication describing `mordred` _and_ this repository specifically.\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",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Community-Maintained Version of mordred",
    "version": "2.0.6",
    "project_urls": {
        "Homepage": "https://github.com/JacksonBurns/mordred-community"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f5e87d1dfd89c39554298939cfdd20cc76aeef6c4404ab32fec1965b0192113c",
                "md5": "d77f525f95eb33ec49fd70f07f6566e7",
                "sha256": "116b484a98d1af74025ed308d0922e43ea9b8857e596702a320ef0d4b2db6296"
            },
            "downloads": -1,
            "filename": "mordredcommunity-2.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d77f525f95eb33ec49fd70f07f6566e7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 175966,
            "upload_time": "2024-07-08T14:27:54",
            "upload_time_iso_8601": "2024-07-08T14:27:54.865948Z",
            "url": "https://files.pythonhosted.org/packages/f5/e8/7d1dfd89c39554298939cfdd20cc76aeef6c4404ab32fec1965b0192113c/mordredcommunity-2.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "638a5abd14239ee48511de1d14f7ed3ea01b226cf5d3cb7189b125be87e83d88",
                "md5": "e9031786be3c59135daebcf3a7bc0677",
                "sha256": "a697866278b606b25012e62492e9e17ace50355618edb8686090365336cda3df"
            },
            "downloads": -1,
            "filename": "mordredcommunity-2.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "e9031786be3c59135daebcf3a7bc0677",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 130786,
            "upload_time": "2024-07-08T14:27:56",
            "upload_time_iso_8601": "2024-07-08T14:27:56.935373Z",
            "url": "https://files.pythonhosted.org/packages/63/8a/5abd14239ee48511de1d14f7ed3ea01b226cf5d3cb7189b125be87e83d88/mordredcommunity-2.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-08 14:27:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JacksonBurns",
    "github_project": "mordred-community",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mordredcommunity"
}
        
Elapsed time: 0.27625s