{ "info": { "author": "Alexander Vasilyev", "author_email": "hamster3d@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "##What is Mathchem?\n\nMathchem is a free open source Python package for calculating topological indices and other invariants of molecular graphs.\n\nThe sources are hosted by Github: \nThe homepage of the project: \n\nThe package was tested under Mac OS X. Since the package contains no compiled code it is cross-platform and could be used in any operating system compatible with Python.\n\n##Usage\n\nAfter successfull installation you can immediately use **mathchem** in Python or Sage\n\n~~~~~~~~~~~~~~~~~~ {.python .numberLines}\n python\n >>> import mathchem as mc\n >>> m = mc.Mol('GhCH?_')\n >>> m\n \n Molecular graph on 8 vertices\n \n >>> m.laplacian_matrix()\n \n matrix([[ 1, -1, 0, 0, 0, 0, 0, 0],\n [-1, 2, -1, 0, 0, 0, 0, 0],\n [ 0, -1, 3, -1, 0, 0, -1, 0],\n [ 0, 0, -1, 3, -1, 0, 0, -1],\n [ 0, 0, 0, -1, 2, -1, 0, 0],\n [ 0, 0, 0, 0, -1, 1, 0, 0],\n [ 0, 0, -1, 0, 0, 0, 1, 0],\n [ 0, 0, 0, -1, 0, 0, 0, 1]])\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n##Structure\n\nCurrently the package consists of two modules: **mathchem** and **utilites**.\n\nThe first one contains the class *Mol*. In a current state the only way to initialize the Mol instance object with structure data is to give a *graph6* or *sparse6* string as an argument: `m = mc.Mol('GhCH?_')`. Support of *SMILES* format will be added later.\n\nThe second module **utilites** contains some useful functions. Currently there is only one function `batch_process(infile, outfile, function)` which allows to easily read a text file sting by string, pass read data to a function and write return value to another file. Here is an axample of use:\n \n~~~~~~~~~~~~~~~~~~ {.python .numberLines}\n import mathchem as mc\n \n def calculate_laplacian_energy(s):\n m = mc.Mol(s)\n return m.energy('laplacian')\n \n u.batch_process('graphs.g6', 'result.txt', calculate_laplacian_energy)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAfter executing this code we can find calculated laplacian energy for all graphs listed in *'graphs.g6'* file as *graph6* strings in *'result.txt'*. In fact, we just applied function *calculate_laplacian_energy* to each line of file *'graphs.g6'* and wrote the result in *'result.txt'*.\n\n\n##Functionality\n###Calculates matrices:\n* Adjacency\n* Incidence\n* Laplacian\n* Signless Laplacian\n* Normalized Laplacian\n* Distance\n* Resistance Distance\n* Reciprocal Distance\n\n~~~~~~~~~~~~~~~~~~ {.python .numberLines}\n >>> import mathchem as mc\n >>> m = mc.Mol('GhCH?_')\n >>> m.distance_matrix()\n \n matrix([[0, 1, 2, 3, 4, 5, 3, 4],\n [1, 0, 1, 2, 3, 4, 2, 3],\n [2, 1, 0, 1, 2, 3, 1, 2],\n [3, 2, 1, 0, 1, 2, 2, 1],\n [4, 3, 2, 1, 0, 1, 3, 2],\n [5, 4, 3, 2, 1, 0, 4, 3],\n [3, 2, 1, 2, 3, 4, 0, 3],\n [4, 3, 2, 1, 2, 3, 3, 0]])\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n###Calculates graph spectral properties: \n\n* Spectrum of the all matrices above\n* Spectral moments\n* Spectral radius\n* Energy\n* Incidence Energy\n\n###Calculates topological indices:\n\n* Zagreb M1 Index\n* Zagreb M2 Index\n* Zagreb M1 Coindex\n* Zagreb M2 Coindex\n* Connectivity index (R)\n* Eccentric Connectivity Index\n* Randic Index\n* Atom-Bond Connectivity Index (ABC)\n* Estrada Index (EE) for all matrices\n* Distance Estrada Index (DEE)\n* Distance Degree (DD)\n* Reverse Distance Degree (rDD)\n* (Schultz) Molecular Topological Index (MTI)\n* Distance Sum\n* Balaban J index\n* Sum-Balaban Index\n* Kirchhoff Index (Kf) or Resistance\n* Wiener Index (W)\n* Terminal Wiener Index (TW)\n* Reverse Wiener Index (RW)\n* Hyper-Wiener Index (WW)\n* Harary Index (H)\n* Sum-Connectivity Index\n* Geometric-Arithmetic Index\n* Multiplicative Sum Zagreb Index\n* Multiplicative P1 Zagreb Index\n* Multiplicative P2 Zagreb Index\n* 148 Discrete Adriatic Indices\n\n~~~~~~~~~~~~~~~~~~ {.python .numberLines}\n >>> import mathchem as mc\n >>> m = mc.Mol('GhCH?_')\n >>> m.reverse_wiener_index()\n \n 72\n \n >>> m.spectrum() # adjacency matrix used by default\n [2.095293985223914, 1.355674293978083, 0.7376403052281872, 0.4772599964740198,\n -0.4772599964740197, -0.7376403052281874, -1.3556742939780824, -2.095293985223914]\n\n >>> m.spectrum('distance') # distance matrix used\n [17.675869817881818, -0.4268447865902264, -0.5999662634461097, -0.8565662710452482,\n -1.4606244785164448, -2.744728088663583, -3.615279075919263, -7.971860853700944]\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n###Calculates graph properties:\n* Order\n* Diameter\n* Degree\n* Eccentricity\n* Connectedness\n* Distances from one vertex others\n\n\n~~~~~~~~~~~~~~~~~~ {.python .numberLines}\n >>> import mathchem as mc\n >>> m = mc.Mol('GhCH?_')\n >>> m.degrees()\n [1, 2, 3, 3, 2, 1, 1, 1]\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n##Installation\n\n###As Python module\nFor any UNIX-like system the installation process is trivial:\n\n pip install mathchem \n\n####Depends on:\nnumpy\n\n###As Sage module\n\nDownload **spkg** file from \n\nSave it into your **sage** directory\n\nRun sage with command to install a new package:\n\n\n sage -f mathchem-1.0.0.spkg\n\n\nAfter that you can use **mathchem** in your sage programs:\n\n sage: import mathchem as mc\n sage: m = mc.Mol('GhCH?_')\n sage: s = m.sage_graph()\n sage: s.show()\n\n\n\n\n##Sage\nSage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.\n\nMission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.\n\n\n\n\n\n##Conception of lazy calculations\n\nFor performance reasons we calculate data only when it is needed and then we save the results.\n\nFor instance we want to calculate three indices based on distance, let say, *Eccentric Connectivity Index*, *Balaban J index* and *Wiener Index*. This means that we need a *distance matrix*, which we calculate only once and then use it:\n\n~~~~~~~~~~~~~~~~~~ {.python .numberLines}\n >>> import mathchem as mc\n >>> m = mc.Mol('GhCH?_')\n >>> print m.eccentric_connectivity_index(), m.balaban_j_index(), m.wiener_index()\n \n 52 3.29247815608 68\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe *distance matrix* will be calculated only once - before calculating the first index. \n\n##About\n\nMathchem package written by Alexander Vasilyev, PhD student of University of Primorska under supervision of prof. Dragan Stevanovi\u0107.\nAll contacts details can be found at the homepage of the project: ", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hamster3d/mathchem-package", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "mathchem", "package_url": "https://pypi.org/project/mathchem/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mathchem/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/hamster3d/mathchem-package" }, "release_url": "https://pypi.org/project/mathchem/1.1.3/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "1.1.3" }, "last_serial": 1002170, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "cba4d8e46d460fd8a0721bc5a73e3ed7", "sha256": "caeac2f3807d6f747211aba38c9a1805ceddf12f10e3352d87a124124a12f40f" }, "downloads": -1, "filename": "mathchem-0.1.0.tar.gz", "has_sig": false, "md5_digest": "cba4d8e46d460fd8a0721bc5a73e3ed7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10155, "upload_time": "2012-08-23T10:48:28", "url": "https://files.pythonhosted.org/packages/e5/a5/eb3e6550be313e74fcc7fcc564fdf5337ed1a3a5c1c0b588731eddff3a88/mathchem-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5fdb126cb89358e75fa8f92743663c5f", "sha256": "827ae6227a5a5252701ba3c0f4865c7efc5e879345ec6a7c18e681c4111f4765" }, "downloads": -1, "filename": "mathchem-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5fdb126cb89358e75fa8f92743663c5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13007, "upload_time": "2013-02-05T14:17:37", "url": "https://files.pythonhosted.org/packages/67/8e/d37f59746b96ea1ec1a91056a8295f13ce435cd969538ba5b33c1b15f273/mathchem-0.1.1.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6c7b9c5e77d00d4adef477aba86860c9", "sha256": "01f5c6560d9431d2b47aa6f636d34b18abb7296cc04647f17f03aa6bb1c847a7" }, "downloads": -1, "filename": "mathchem-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6c7b9c5e77d00d4adef477aba86860c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16020, "upload_time": "2013-05-20T11:35:42", "url": "https://files.pythonhosted.org/packages/02/8a/8e81f12fe6291838c8db3d1939c028565450c2ceebda8f088dad439565f2/mathchem-0.2.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "c0ec79a9f07dad23d4e78c39fd695444", "sha256": "df8cc1004ef4d6b9282003c8eefe1546150dcc91ce1fa799c394a572ee693a33" }, "downloads": -1, "filename": "mathchem-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c0ec79a9f07dad23d4e78c39fd695444", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17914, "upload_time": "2013-10-01T12:33:43", "url": "https://files.pythonhosted.org/packages/50/2d/4b9cc4e86360f243c43363fd8cb43bec050dd4ce9810caaa17921c6211d9/mathchem-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "069ccdeb5c2083d7b37f94323e14d979", "sha256": "1735d49766ff4b77033cf27cdb21f55a72f0625a469aa9f58c1e5f65f797fae2" }, "downloads": -1, "filename": "mathchem-1.0.1.tar.gz", "has_sig": false, "md5_digest": "069ccdeb5c2083d7b37f94323e14d979", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17942, "upload_time": "2013-10-02T20:18:21", "url": "https://files.pythonhosted.org/packages/78/30/1feac90eea2ad0e13b97d26f9096bf1c6f7db6daf0c833baf7744228d4fb/mathchem-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "aabba8c7027653ade0c45b067296cc4c", "sha256": "1a2de80693f4cbe4325027f7430d028f850d4c7db60ce1f5bfb5528143db9cd8" }, "downloads": -1, "filename": "mathchem-1.0.2.tar.gz", "has_sig": false, "md5_digest": "aabba8c7027653ade0c45b067296cc4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17973, "upload_time": "2013-10-02T20:28:51", "url": "https://files.pythonhosted.org/packages/80/f7/3450b9365de8e0fc3f736097eaf2770b9d0a089d0946170546fed96b3995/mathchem-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "8204b971d03e5aad14372f015412ea88", "sha256": "512906e682f1962179e5e6416ae0f4b12b320939e98f99785a4be07480398f8f" }, "downloads": -1, "filename": "mathchem-1.0.3.tar.gz", "has_sig": false, "md5_digest": "8204b971d03e5aad14372f015412ea88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17984, "upload_time": "2013-10-02T20:30:54", "url": "https://files.pythonhosted.org/packages/21/4c/fbdeda60aa7a1ec87bd16080275974a030ee0f85fb88e343f7e3ecef5c11/mathchem-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "982fbede6e7a0541b70b7b612645bfd2", "sha256": "cd9b0f746f247c5c1b477a16cec8743bc50f8837655817c2179e7eb82cec21f9" }, "downloads": -1, "filename": "mathchem-1.0.4.tar.gz", "has_sig": false, "md5_digest": "982fbede6e7a0541b70b7b612645bfd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18081, "upload_time": "2013-10-04T11:35:53", "url": "https://files.pythonhosted.org/packages/c8/9b/b9f6987272df1eecea1cf32378d01fe5efc04bf4512b7e2719dbd926896e/mathchem-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "051f981d940dcf5e65698f8461e73e21", "sha256": "eb225fc6dcdf6bce41e53756eb07430256b725e452ead1444abb19944ec790fb" }, "downloads": -1, "filename": "mathchem-1.0.5.tar.gz", "has_sig": false, "md5_digest": "051f981d940dcf5e65698f8461e73e21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18418, "upload_time": "2013-10-08T10:37:30", "url": "https://files.pythonhosted.org/packages/1f/81/746fcb797e577ebdace3e526d0c82ce551c6d969717b5e73a4ebe46a5959/mathchem-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "260ff2bc50d6a67c97f8c45b08c1766a", "sha256": "a690c97463f7d53f902a00111106ea82b5545dec679625ddac4d508beaf3df8a" }, "downloads": -1, "filename": "mathchem-1.0.6.tar.gz", "has_sig": false, "md5_digest": "260ff2bc50d6a67c97f8c45b08c1766a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18431, "upload_time": "2013-11-06T13:33:10", "url": "https://files.pythonhosted.org/packages/61/51/1d7950d3342ed4600896a241f4b5db7390f6419220636949eccbe823d8d8/mathchem-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "0b66021f10dca95abd11baa2924ac142", "sha256": "1abb9d2fd16fe2d708d5740451e0b886131e49db26b23d57120b53002cb00c8e" }, "downloads": -1, "filename": "mathchem-1.0.7.tar.gz", "has_sig": false, "md5_digest": "0b66021f10dca95abd11baa2924ac142", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18445, "upload_time": "2013-11-06T13:43:44", "url": "https://files.pythonhosted.org/packages/36/f1/bebcf2db0393123dda2af86acd651ff43a1d7a730fa1a9ab0de7d6382e2a/mathchem-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "b31c0a3065bde844283abf85572080cc", "sha256": "0e94e72b7596040ea2b127163beed12ca92af7af3a4429c65a99ded868045be1" }, "downloads": -1, "filename": "mathchem-1.0.8.tar.gz", "has_sig": false, "md5_digest": "b31c0a3065bde844283abf85572080cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18447, "upload_time": "2013-11-06T13:48:02", "url": "https://files.pythonhosted.org/packages/ff/92/f5084e7f81fbbc50fade4ede96928af19404177ff8ac6fe9c46fe7c3aca2/mathchem-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "12c188afd6398dee7f1c32bedda64215", "sha256": "5f2d03899a9a98029396e844f012a676c5eab00e6ddd2077e3b8bc82c4977050" }, "downloads": -1, "filename": "mathchem-1.0.9.tar.gz", "has_sig": false, "md5_digest": "12c188afd6398dee7f1c32bedda64215", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18450, "upload_time": "2013-11-06T13:53:09", "url": "https://files.pythonhosted.org/packages/e5/09/92ddffd4ae504bb7f8937a6f9488461ba8538f6cc56294db424a91c7542b/mathchem-1.0.9.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "b9f96c34eab6bdbcf15c7cce3314bb22", "sha256": "81bd08f9bc36f618c32194764c1ab38f52abeae9b2aa2ea5faca191669d929dd" }, "downloads": -1, "filename": "mathchem-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b9f96c34eab6bdbcf15c7cce3314bb22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18520, "upload_time": "2013-12-24T13:03:57", "url": "https://files.pythonhosted.org/packages/f1/dc/bb252792950ec2b98674a3db1fd42b28557d4d7d1c1896c3df8b693a80c0/mathchem-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "af6fdd3f8c195bcba69df763ebf3a285", "sha256": "5e8c8399cf7f0abdbbf2998068640ed6aa96ced51d75a98841ab4b3faf017f39" }, "downloads": -1, "filename": "mathchem-1.1.1.tar.gz", "has_sig": false, "md5_digest": "af6fdd3f8c195bcba69df763ebf3a285", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18565, "upload_time": "2013-12-27T11:11:49", "url": "https://files.pythonhosted.org/packages/93/df/1d68352051bf2671086267553b816054daa0214a826f0d3f2dea6061eb10/mathchem-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "e0ba6ab9635f2eb7772c6408013a4e31", "sha256": "1fdec97b477747337c90129163c2748c0b2229e4ed896d48af19926ee62bce24" }, "downloads": -1, "filename": "mathchem-1.1.2.tar.gz", "has_sig": false, "md5_digest": "e0ba6ab9635f2eb7772c6408013a4e31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18747, "upload_time": "2014-01-24T12:29:03", "url": "https://files.pythonhosted.org/packages/89/46/d1c6d33bc0bb58203e35e39d2b81282a6cd062b416dcb0848984cb24b21c/mathchem-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "7a9bb6246f2a0359d85c290243fd3eec", "sha256": "14f52d9ac8f380f2fe4db96f27364405ede1d91b7ea6afdebb5934af06a322cf" }, "downloads": -1, "filename": "mathchem-1.1.3.tar.gz", "has_sig": false, "md5_digest": "7a9bb6246f2a0359d85c290243fd3eec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18759, "upload_time": "2014-02-17T14:04:53", "url": "https://files.pythonhosted.org/packages/62/e4/2b65ad6445b5e6762c2ab6e7e301934e41a201c8ab2fd9d5dd3ee1f578a8/mathchem-1.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a9bb6246f2a0359d85c290243fd3eec", "sha256": "14f52d9ac8f380f2fe4db96f27364405ede1d91b7ea6afdebb5934af06a322cf" }, "downloads": -1, "filename": "mathchem-1.1.3.tar.gz", "has_sig": false, "md5_digest": "7a9bb6246f2a0359d85c290243fd3eec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18759, "upload_time": "2014-02-17T14:04:53", "url": "https://files.pythonhosted.org/packages/62/e4/2b65ad6445b5e6762c2ab6e7e301934e41a201c8ab2fd9d5dd3ee1f578a8/mathchem-1.1.3.tar.gz" } ] }