# ClustIce
A tool to generate exotic ice clusters.
version 0.7.1
## Requirements
* python
* numpy
* networkx
* scikit-learn
* cycless
## Installation
ClustIce is registered to [PyPI (Python Package Index)](https://pypi.python.org/pypi/GenIce).
Install with pip3.
pip3 install clustice
## Uninstallation
pip3 uninstall clustice
## API
API manual is [here](https://clustice.github.io/ClustIce).
## Examples
Make an icosahedral ice cluster.
```python
import numpy as np
import networkx as nx
import genice_core
from clustice.geometry import make_layout
from clustice.gromacs import render
from clustice.water import tip4p
from clustice import graph
# O-O distance
L = 0.27
# note: g must be a graph whose labels start from 0.
# g = graph.great_icosahedron(12, separation=L)
g = graph.great_decahedron(12)
# g = graph.small_barrelan()
# g = graph.large_barrelan()
# g = graph.twistane()
# g = graph.adamantane()
# g = nx.cycle_graph(6) # hexagon
# g = nx.cycle_graph(7) # heptagon
# g = nx.cubical_graph() # cubic octamer
# g = nx.dodecahedral_graph()
if "pos" in g.nodes[0]:
# extract the embedded coords in g
layout = np.array([g.nodes[v]["pos"] for v in g])
else:
# estimate of the positions of the nodes
layout = make_layout(g, edgelen=L)
# set orientations of the hydrogen bonds.
# if vertexPositions is given, the net dipole moment is minimized.
dg = genice_core.ice_graph(g, vertexPositions=layout, dipoleOptimizationCycles=100)
# put water molecules
gro = render(dg, layout, watermodel=tip4p)
with open("sample.gro", "w") as f:
f.write(gro)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/vitroid/ClustIce",
"name": "ClustIce",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Masakazu Matsumoto",
"author_email": "vitroid@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1c/50/2c1cc3c0e267cd687a9b299497bba405f9d55b2a20569306bcee0a4ace38/clustice-0.7.3.tar.gz",
"platform": null,
"description": "# ClustIce\n\nA tool to generate exotic ice clusters.\n\nversion 0.7.1\n\n## Requirements\n\n* python\n* numpy\n* networkx\n* scikit-learn\n* cycless\n\n\n## Installation\n\nClustIce is registered to [PyPI (Python Package Index)](https://pypi.python.org/pypi/GenIce).\nInstall with pip3.\n\n pip3 install clustice\n\n## Uninstallation\n\n pip3 uninstall clustice\n\n## API\n\nAPI manual is [here](https://clustice.github.io/ClustIce).\n\n## Examples\n\nMake an icosahedral ice cluster.\n\n```python\nimport numpy as np\nimport networkx as nx\n\nimport genice_core\nfrom clustice.geometry import make_layout\nfrom clustice.gromacs import render\nfrom clustice.water import tip4p\nfrom clustice import graph\n\n# O-O distance\nL = 0.27\n\n# note: g must be a graph whose labels start from 0.\n# g = graph.great_icosahedron(12, separation=L)\ng = graph.great_decahedron(12)\n# g = graph.small_barrelan()\n# g = graph.large_barrelan()\n# g = graph.twistane()\n# g = graph.adamantane()\n# g = nx.cycle_graph(6) # hexagon\n# g = nx.cycle_graph(7) # heptagon\n# g = nx.cubical_graph() # cubic octamer\n# g = nx.dodecahedral_graph()\n\n\nif \"pos\" in g.nodes[0]:\n # extract the embedded coords in g\n layout = np.array([g.nodes[v][\"pos\"] for v in g])\nelse:\n # estimate of the positions of the nodes\n layout = make_layout(g, edgelen=L)\n\n# set orientations of the hydrogen bonds.\n# if vertexPositions is given, the net dipole moment is minimized.\ndg = genice_core.ice_graph(g, vertexPositions=layout, dipoleOptimizationCycles=100)\n\n# put water molecules\ngro = render(dg, layout, watermodel=tip4p)\nwith open(\"sample.gro\", \"w\") as f:\n f.write(gro)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A tool to generate exotic ice clusters.",
"version": "0.7.3",
"project_urls": {
"Homepage": "https://github.com/vitroid/ClustIce",
"Repository": "https://github.com/vitroid/ClustIce"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bbe4cee9afc54b00795a696803733d70059b64fc34242fa986b623fd1fc141a2",
"md5": "e0fff311801939bc3dd45f32f5d1a834",
"sha256": "567ed97a4a2b900c74f9a18191d58445b8bfd445f2e2dae1b9c726ae43e1bee2"
},
"downloads": -1,
"filename": "clustice-0.7.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e0fff311801939bc3dd45f32f5d1a834",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 12061,
"upload_time": "2024-12-10T12:53:57",
"upload_time_iso_8601": "2024-12-10T12:53:57.999862Z",
"url": "https://files.pythonhosted.org/packages/bb/e4/cee9afc54b00795a696803733d70059b64fc34242fa986b623fd1fc141a2/clustice-0.7.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1c502c1cc3c0e267cd687a9b299497bba405f9d55b2a20569306bcee0a4ace38",
"md5": "1a1dc42cbe9cbc3cef7d56313193f320",
"sha256": "08596a3de576ae3033453159902928b56a7ceafb3c8100da93621f95191dfec5"
},
"downloads": -1,
"filename": "clustice-0.7.3.tar.gz",
"has_sig": false,
"md5_digest": "1a1dc42cbe9cbc3cef7d56313193f320",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 10782,
"upload_time": "2024-12-10T12:54:00",
"upload_time_iso_8601": "2024-12-10T12:54:00.302318Z",
"url": "https://files.pythonhosted.org/packages/1c/50/2c1cc3c0e267cd687a9b299497bba405f9d55b2a20569306bcee0a4ace38/clustice-0.7.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-10 12:54:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vitroid",
"github_project": "ClustIce",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "clustice"
}