{"id":16467444,"url":"https://github.com/andrewtarzia/spindry","last_synced_at":"2025-03-23T11:32:39.786Z","repository":{"id":44660908,"uuid":"353315997","full_name":"andrewtarzia/SpinDry","owner":"andrewtarzia","description":"Low-cost host-guest conformer generation","archived":false,"fork":false,"pushed_at":"2024-02-29T12:29:32.000Z","size":817,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T21:33:29.015Z","etag":null,"topics":["high-throughput","host-guest","materials-informatics","monte-carlo","porous-materials","simulation"],"latest_commit_sha":null,"homepage":"https://spindry.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewtarzia.png","metadata":{"files":{"readme":"readme.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-31T10:24:57.000Z","updated_at":"2024-11-08T01:56:48.000Z","dependencies_parsed_at":"2024-10-28T16:06:29.685Z","dependency_job_id":null,"html_url":"https://github.com/andrewtarzia/SpinDry","commit_stats":{"total_commits":135,"total_committers":1,"mean_commits":135.0,"dds":0.0,"last_synced_commit":"c37281544ecf47c96140deab6d48f424c6e79b59"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewtarzia%2FSpinDry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewtarzia%2FSpinDry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewtarzia%2FSpinDry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewtarzia%2FSpinDry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewtarzia","download_url":"https://codeload.github.com/andrewtarzia/SpinDry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245097158,"owners_count":20560311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["high-throughput","host-guest","materials-informatics","monte-carlo","porous-materials","simulation"],"created_at":"2024-10-11T11:47:29.344Z","updated_at":"2025-03-23T11:32:39.292Z","avatar_url":"https://github.com/andrewtarzia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"SpinDry\n=======\n\n:author: Andrew Tarzia\n\nA Monte Carlo-based host-guest conformer generator using cheap and unphysical\npotentials.\n\nPlease submit an issue with any questions or bugs!\n\n``SpinDry`` uses the Monte-Carlo/molecule interface provided by my other code\n``MCHammer`` (https://github.com/andrewtarzia/MCHammer)\n\nInstallation\n------------\n\nInstall using pip:\n\n.. code-block:: bash\n\n  pip install spindry\n\nAlgorithm\n---------\n\nSpinDry implements a simple Metropolis Monte-Carlo algorithm to translate and\nrotate the guest molecules.\nAll atom positions/bond lengths within the host and guest are kept rigid and\ndo not contribute to the potential energy.\nThe algorithm uses, by default, a simple Lennard-Jones nonbonded potential to\ndefine the potential energy surface such that steric clashes are avoided. Atom\nradii are taken from STREUSSEL (\u003chttps://github.com/hmsoregon/STREUSEL\u003e).\nCustom potential functions can also be defined now -- see\n``examples/custom_potential_function.py``.\n\nThe default MC algorithm is as follows:\n\nFor ``step`` in *N* steps:\n    1. Define a translation of the guest by a random unit-vector and a random\n    [-1, 1) step along the that vector.\n    2. Define a rotation of the guest by a random [-1, 1) * ``rotation_step_size``\n    angle and a random unit axis.\n    3. Compute system potential ``U_nb``:\n        ``U_nb`` is the nonbonded potential, defined by the Lennard-Jones\n        potential:\n            ``U_nb = sum_i,j (epsilon_nb * ((sigma / r_ij)^12 - (sigma / r_ij)^6))``,\n            where ``epsilon_nb`` defines the strength of the potential,\n            ``sigma`` defines the position where the potential becomes\n            repulsive and ``r_ij`` is the pairwise distance between atoms\n            ``i`` and ``j``.\n    4. Accept or reject move:\n        Accept if ``U_i`` \u003c ``U_(i-1)`` or ``exp(-beta(U_i - U_(i-1))`` \u003e\n        ``R``, where ``R`` is a random number [0, 1) and ``beta`` is the\n        inverse Boltzmann temperature.\n        Reject otherwise.\n    5. If ``num_conformers`` is met, quit.\n\nExamples\n--------\n\nThe workflow for a porous organic cage built using *stk*\n(\u003chttps://stk.readthedocs.io/\u003e) is shown in ``examples/`` for a single guest\nand multiple guests.\n\nThe Spinner class yields a ``SupraMolecule`` conformer. Only conformers that\npass the MC conditions are yielded. The examples in ``examples`` show how to\naccess the structures of these conformers as ``.xyz`` files or `stk` molecules.\n\nContributors and Acknowledgements\n---------------------------------\n\nI developed this code as a post doc in the Jelfs research group at Imperial\nCollege London (\u003chttp://www.jelfs-group.org/\u003e,\n\u003chttps://github.com/JelfsMaterialsGroup\u003e).\n\nThis code was reviewed and edited by: Lukas Turcani\n(\u003chttps://github.com/lukasturcani\u003e)\n\nLicense\n-------\n\nThis project is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewtarzia%2Fspindry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewtarzia%2Fspindry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewtarzia%2Fspindry/lists"}