{ "info": { "author": "Florian Rhiem", "author_email": "florian.rhiem@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Physics", "Topic :: Scientific/Engineering :: Visualization" ], "description": "mogli\n=====\n\nmogli is a python module for easily rendering molecules.\n\nThe fastest way to get started is using mogli.py in the command line:\n\n::\n\n % python -m mogli \n\nThis will open a new window in which the molecule will be rendered. You\ncan then rotate the molecule using your mouse.\n\nIn python, you can achieve something similar with three lines of code:\n\n::\n\n >>> import mogli\n >>> molecules = mogli.read('examples/dna.xyz')\n >>> mogli.show(molecules[0])\n\n.. figure:: https://raw.githubusercontent.com/FlorianRhiem/mogli/doc-images/dna-cli.png\n :alt: DNA rendered in a GR window\n\n DNA rendered in a GR window\n\nAtomic bonds\n------------\n\nYou might notice that the atomic bonds between the atoms don't look\nright. You can hide the bonds by adding the ``show_bonds=False`` to your\n``show()`` call, but of course there's a a better way to fix the missing\nbonds here.\n\nFor the example above, adding ``bond_param=1.15`` to ``show()`` will do\nthe trick. mogli currently offers two ways of calculating atomic bonds.\nThe first method compares the distance between every two atoms with the\nsum of their valence radii. If they are further apart, no bond is\nformed. To allow a bit of adjustment, this radii sum is multiplied with\na factor that can be set using the ``bond_param`` parameter to\n``show()`` and ``draw()``. By default, ``1.0`` is used.\n\nThe second method uses a constant maximum distance instead. If you use\nthis method by passing ``bond_method='constant_delta'`` to ``show()`` or\n``draw()``, you can set the constant distance with the ``bond_param``\nparameter.\n\nExporting to files\n------------------\n\nInstead of viewing molecules interactively, you can export the molecule\nas well, for example as Portable Network Graphics into a ``.png`` file,\nor as HTML5 page with interactive WebGL code as ``.html`` file. To do\nso, simply call the ``export()`` function, like so:\n\n::\n\n >>> import mogli\n >>> molecules = mogli.read('examples/dna.xyz')\n >>> mogli.export(molecules[0], 'dna.html', width=1920, height=1080,\n bonds_param=1.15, camera=((40, 0, 0),\n (0, 0, 0),\n (0, 1, 0)))\n\nThis example code also shows setting the camera in code by passing the\n``camera`` parameter. It expects three sequences of three floating point\nnumbers: the camera position, the center of focus and a direction that\nshould point upward. *Exporting to HTML5 with WebGL is a pretty near\nfeature, give it a try!*\n\nDrawing with GR\n---------------\n\nIn case you use the GR framework, you can use mogli to draw molecules\ninto your GR graphics. To do so, just call ``draw()``. You can use the\nparameters ``xmin``, ``xmax``, ``ymin``, ``ymax``, ``width`` and\n``height`` just like you would when using ``gr.drawimage()``.\n\n::\n\n >>> import gr\n >>> import mogli\n >>> molecules = mogli.read('examples/dna.xyz')\n >>> mogli.draw(molecules[0])\n >>> gr.updatews()\n\n.. figure:: https://raw.githubusercontent.com/FlorianRhiem/mogli/doc-images/dna-gr.png\n :alt: DNA rendered in a GR window\n\n DNA rendered in a GR window\n\nDependencies\n------------\n\nmogli depends on GR3, which is included in the `GR\nframework `__\n(`PyPI `__,\n`GitHub `__), on\n`glfw3 `__\n(`GitHub `__) and python bindings for\nglfw3 (`PyPI `__,\n`GitHub `__).\n\nAdditionally,\n`Pybel `__\nshould be installed; mogli will work without it, but only for xyz files.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/FlorianRhiem/mogli", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "mogli", "package_url": "https://pypi.org/project/mogli/", "platform": "", "project_url": "https://pypi.org/project/mogli/", "project_urls": { "Homepage": "https://github.com/FlorianRhiem/mogli" }, "release_url": "https://pypi.org/project/mogli/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Simple visualization of molecules in python", "version": "0.3.0" }, "last_serial": 2696176, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "d6d15d6f65ed83e6d6e4e438276f0d62", "sha256": "38b48a40f3a7460d2eee143c1ab7c3836e7b56def63f583a12faf57b6defc7ed" }, "downloads": -1, "filename": "mogli-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d6d15d6f65ed83e6d6e4e438276f0d62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12074, "upload_time": "2014-10-29T14:02:25", "url": "https://files.pythonhosted.org/packages/c9/b4/b33bdafbdcb79bdd2b5f1f12d2bbd21dd2f0996a342c9ac7ce3654f319e0/mogli-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0a72da088762a4a2e640113c2dd92f38", "sha256": "9cb33fd80f53b6a1b13ad6e5f1f14e56bef7cb0bf1c826e29c1c63e0212b51e9" }, "downloads": -1, "filename": "mogli-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0a72da088762a4a2e640113c2dd92f38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12110, "upload_time": "2014-11-10T15:34:59", "url": "https://files.pythonhosted.org/packages/8b/0f/5dff9f50c181ccdc03c5e952530ba084551cfacd4e80b7ac4f8c0229f18c/mogli-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "04e49168e5ba4a8701320ea6da701a1d", "sha256": "775d6d96150ba8633a3828eb566c2dee4b0ab31133683b91c01a0d236741ed3c" }, "downloads": -1, "filename": "mogli-0.2.2.tar.gz", "has_sig": false, "md5_digest": "04e49168e5ba4a8701320ea6da701a1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12190, "upload_time": "2014-11-11T15:26:42", "url": "https://files.pythonhosted.org/packages/9f/ef/c333384d170dea198e81ec0aca0c5eeda691ce9097f586bf9caaf4eb35dc/mogli-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "8a50349ea80de47da9bdad11f9c0169b", "sha256": "6d1979a6082484b96acf1d868aa2c96d2a24078746b464386ad16059f15917ee" }, "downloads": -1, "filename": "mogli-0.2.3.tar.gz", "has_sig": false, "md5_digest": "8a50349ea80de47da9bdad11f9c0169b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12338, "upload_time": "2015-04-07T08:25:58", "url": "https://files.pythonhosted.org/packages/9e/4c/935898af9c8a6439eaaa87bfec707a8aa9cf00e67f84702d470eff3b6c9a/mogli-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a798fb4160f35f6cbc9b1a14a3d60d64", "sha256": "959a90aaa09fd4eb66b557e1e0262b8242fc7e43c0d906ac7108452992f9e9bd" }, "downloads": -1, "filename": "mogli-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a798fb4160f35f6cbc9b1a14a3d60d64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12344, "upload_time": "2017-03-10T08:06:51", "url": "https://files.pythonhosted.org/packages/5e/0c/1921faa4ed81c3d0636529b4f49daead7d266938e6087d599dd1f87163b3/mogli-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a798fb4160f35f6cbc9b1a14a3d60d64", "sha256": "959a90aaa09fd4eb66b557e1e0262b8242fc7e43c0d906ac7108452992f9e9bd" }, "downloads": -1, "filename": "mogli-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a798fb4160f35f6cbc9b1a14a3d60d64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12344, "upload_time": "2017-03-10T08:06:51", "url": "https://files.pythonhosted.org/packages/5e/0c/1921faa4ed81c3d0636529b4f49daead7d266938e6087d599dd1f87163b3/mogli-0.3.0.tar.gz" } ] }