nmross


Namenmross JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryGives an approximate 1H NMR when given a smiles or a IUPAC name of a molecule with maximum one aromatic ring and no double bonds.
upload_time2024-05-30 07:44:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2024 by Cedric Rossboth <cedric.rossboth@epfl.ch> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords nmr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Project Logo](assets/banner.png)

![Coverage Status](assets/coverage-badge.svg)

<h1 align="center">
NMRoss
</h1>

<br>


Gives an approximate 1H NMR when given a smiles or a IUPAC name of a molecule with maximum one aromatic ring and no double bonds.

## `🧑‍🔧:` Installation 
Here are the steps to directly install the nmross package using pip install.

## 1. Create a Virtual Environment 

We advise you to create an environment where you want to work on the project. Then activate the environment:
```
conda create -n nmross python=3.10
conda activate nmross
```
## 2. Install Package
```
pip install nmross
```
## 3. Install JupyterLab
```
pip install jupyter lab
jupyter lab
```

## `👷‍♂️:` Local installation 

## 1. Fork the Repository

First, fork the repository to your own GitHub account. This creates a copy of the repository under your GitHub account.

## 2. Clone the Repository

Clone the forked repository to your local machine: replace 'your-username' with your username.
```
git clone https://github.com/your-username/nmross.git
cd nmross
```

## 3. Create a Virtual Environment

Create a new virtual environment to keep your dependencies isolated: and activate the environment.
```
conda create -n nmross python=3.10
conda activate nmross
```
## 4. Install dependencies via conda

To avoid any build issues when installing some of the necessary packages for installation, it is easier to install them using conda.
```
conda install -c conda-forge numpy matplotlib rdkit
```




## 5. Install the Package Locally

With the virtual environment activated, install the package locally using 'pip install .': this installs the package that are in the current folder so make sure you are in the environment nmross.
```
pip install .
```
## 6. Install JupyterLab 

Install jupyter lab in the nmross environment. You can launch jupyter lab by copying the second line.

```
pip install jupyter lab
jupyter lab
```


## `🧠:` Usage


The two main functions of this module are NMR(name : str) and Show(name : str, index : int).

The function NMR takes as an input either the IUPAC name of the compound or the smiles representation of it. This function outputs a plot of the NMR of the molecule and the Mol object of the molecule. The plot appears automatically when using NMR(name), but if needed there is a Mol object that allows to see which atom on the molecule has which index.

The function Show takes as inputs either the IUPAC name of the compound or the smiles representation of it and an index in the molecule. The function outputs a plot of the 1H NMR of the molecule with the peak of the atom chosen hihlighted and a Mol object with all equivalent hydrogens highlighted. The function only ever plots a NMR spectrum if the atom with the index chosen has at least one hydrogen. The plot appears automatically when using the Show() method but the Mol object needs to be stocked in a variable to be shown.

One who only ever wants to know the 1H NMR of ethanol would use the package like this:

```python
from nmross.NMRoss import NMR
plt, mol = NMR('CCO')
mol
```

One who would like to know which peak is the one of the terminal carbon would use the package like this. First:

```python
from nmross.NMRoss import NMR, Show
plt, mol = NMR('CCO')
mol
```

The 'mol' code line serves to identify how the program gives the indices to the atoms in the molecule. One of these indices can then be used during the following step. In this case, the terminal carbon is the one that is meant to be identified. Thus, the next steps are:
```python
plt, mol = Show('CCO', 0)
mol
```
This shows that the primary carbon has hydrogens which are non equivalent to other hydrogens in the molecule.

## `📖:`Tests

To run the tests, one would need to clone the repository as shown above and then simply write the line code below in the terminal. Be aware that you need to change direction in order to be in the correct file.
```python
pip install pytest
pytest
```









            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nmross",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "NMR",
    "author": null,
    "author_email": "Cedric Rossboth <cedric.rossboth@epfl.ch>",
    "download_url": "https://files.pythonhosted.org/packages/00/60/ae777c8e2691f029d6eef2747b9a25fadcfe6b33dc398d89ba42293ed5ca/nmross-0.0.1.tar.gz",
    "platform": null,
    "description": "![Project Logo](assets/banner.png)\r\n\r\n![Coverage Status](assets/coverage-badge.svg)\r\n\r\n<h1 align=\"center\">\r\nNMRoss\r\n</h1>\r\n\r\n<br>\r\n\r\n\r\nGives an approximate 1H NMR when given a smiles or a IUPAC name of a molecule with maximum one aromatic ring and no double bonds.\r\n\r\n## `\ud83e\uddd1\u200d\ud83d\udd27:` Installation \r\nHere are the steps to directly install the nmross package using pip install.\r\n\r\n## 1. Create a Virtual Environment \r\n\r\nWe advise you to create an environment where you want to work on the project. Then activate the environment:\r\n```\r\nconda create -n nmross python=3.10\r\nconda activate nmross\r\n```\r\n## 2. Install Package\r\n```\r\npip install nmross\r\n```\r\n## 3. Install JupyterLab\r\n```\r\npip install jupyter lab\r\njupyter lab\r\n```\r\n\r\n## `\ud83d\udc77\u200d\u2642\ufe0f:` Local installation \r\n\r\n## 1. Fork the Repository\r\n\r\nFirst, fork the repository to your own GitHub account. This creates a copy of the repository under your GitHub account.\r\n\r\n## 2. Clone the Repository\r\n\r\nClone the forked repository to your local machine: replace 'your-username' with your username.\r\n```\r\ngit clone https://github.com/your-username/nmross.git\r\ncd nmross\r\n```\r\n\r\n## 3. Create a Virtual Environment\r\n\r\nCreate a new virtual environment to keep your dependencies isolated: and activate the environment.\r\n```\r\nconda create -n nmross python=3.10\r\nconda activate nmross\r\n```\r\n## 4. Install dependencies via conda\r\n\r\nTo avoid any build issues when installing some of the necessary packages for installation, it is easier to install them using conda.\r\n```\r\nconda install -c conda-forge numpy matplotlib rdkit\r\n```\r\n\r\n\r\n\r\n\r\n## 5. Install the Package Locally\r\n\r\nWith the virtual environment activated, install the package locally using 'pip install .': this installs the package that are in the current folder so make sure you are in the environment nmross.\r\n```\r\npip install .\r\n```\r\n## 6. Install JupyterLab \r\n\r\nInstall jupyter lab in the nmross environment. You can launch jupyter lab by copying the second line.\r\n\r\n```\r\npip install jupyter lab\r\njupyter lab\r\n```\r\n\r\n\r\n## `\ud83e\udde0:` Usage\r\n\r\n\r\nThe two main functions of this module are NMR(name : str) and Show(name : str, index : int).\r\n\r\nThe function NMR takes as an input either the IUPAC name of the compound or the smiles representation of it. This function outputs a plot of the NMR of the molecule and the Mol object of the molecule. The plot appears automatically when using NMR(name), but if needed there is a Mol object that allows to see which atom on the molecule has which index.\r\n\r\nThe function Show takes as inputs either the IUPAC name of the compound or the smiles representation of it and an index in the molecule. The function outputs a plot of the 1H NMR of the molecule with the peak of the atom chosen hihlighted and a Mol object with all equivalent hydrogens highlighted. The function only ever plots a NMR spectrum if the atom with the index chosen has at least one hydrogen. The plot appears automatically when using the Show() method but the Mol object needs to be stocked in a variable to be shown.\r\n\r\nOne who only ever wants to know the 1H NMR of ethanol would use the package like this:\r\n\r\n```python\r\nfrom nmross.NMRoss import NMR\r\nplt, mol = NMR('CCO')\r\nmol\r\n```\r\n\r\nOne who would like to know which peak is the one of the terminal carbon would use the package like this. First:\r\n\r\n```python\r\nfrom nmross.NMRoss import NMR, Show\r\nplt, mol = NMR('CCO')\r\nmol\r\n```\r\n\r\nThe 'mol' code line serves to identify how the program gives the indices to the atoms in the molecule. One of these indices can then be used during the following step. In this case, the terminal carbon is the one that is meant to be identified. Thus, the next steps are:\r\n```python\r\nplt, mol = Show('CCO', 0)\r\nmol\r\n```\r\nThis shows that the primary carbon has hydrogens which are non equivalent to other hydrogens in the molecule.\r\n\r\n## `\ud83d\udcd6:`Tests\r\n\r\nTo run the tests, one would need to clone the repository as shown above and then simply write the line code below in the terminal. Be aware that you need to change direction in order to be in the correct file.\r\n```python\r\npip install pytest\r\npytest\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 by Cedric Rossboth <cedric.rossboth@epfl.ch>  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Gives an approximate 1H NMR when given a smiles or a IUPAC name of a molecule with maximum one aromatic ring and no double bonds.",
    "version": "0.0.1",
    "project_urls": {
        "source": "https://github.com/CedricRossboth/nmross",
        "tracker": "https://github.com/CedricRossboth/nmross/issues"
    },
    "split_keywords": [
        "nmr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26f5197ddf3638df9e113672f6d3dc397d10affb42a6536d64ec7aac0dee0d71",
                "md5": "1c06d4468b071abfdd5e828a9059dcca",
                "sha256": "770275e170ed835e848ef0fa46507750028d886c1804c8ece0a66243c64569bf"
            },
            "downloads": -1,
            "filename": "nmross-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1c06d4468b071abfdd5e828a9059dcca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 20454,
            "upload_time": "2024-05-30T07:44:49",
            "upload_time_iso_8601": "2024-05-30T07:44:49.925986Z",
            "url": "https://files.pythonhosted.org/packages/26/f5/197ddf3638df9e113672f6d3dc397d10affb42a6536d64ec7aac0dee0d71/nmross-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0060ae777c8e2691f029d6eef2747b9a25fadcfe6b33dc398d89ba42293ed5ca",
                "md5": "b2e8e6d51bb5ccf3ec286044344fe0f9",
                "sha256": "3b3374f5f116e53137fe4429a2e052d773928d599e597deade8a41cd1e86f3f9"
            },
            "downloads": -1,
            "filename": "nmross-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b2e8e6d51bb5ccf3ec286044344fe0f9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 26607,
            "upload_time": "2024-05-30T07:44:51",
            "upload_time_iso_8601": "2024-05-30T07:44:51.293621Z",
            "url": "https://files.pythonhosted.org/packages/00/60/ae777c8e2691f029d6eef2747b9a25fadcfe6b33dc398d89ba42293ed5ca/nmross-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-30 07:44:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CedricRossboth",
    "github_project": "nmross",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "nmross"
}
        
Elapsed time: 0.53518s