# 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.9",
"maintainer_email": null,
"keywords": null,
"author": "Masakazu Matsumoto",
"author_email": "vitroid@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/87/b7/f1fd11a2878ee12ae7c1a68411a1d12242c57b7281a5da6f2fbf2bef62ab/clustice-0.7.1.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.1",
"project_urls": {
"Homepage": "https://github.com/vitroid/ClustIce",
"Repository": "https://github.com/vitroid/ClustIce"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "20e2956621c2b0d085076d9c3d3c8a76229610e8cee70dd7ebba7f628f1c110b",
"md5": "c2d50cca04725b3cf1f01a7411a8044b",
"sha256": "ccdc9e76ff9ee04dc98f6b2f1cd60a0f5fdcabcaeb554e7dd565e4926818d526"
},
"downloads": -1,
"filename": "clustice-0.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c2d50cca04725b3cf1f01a7411a8044b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 10765,
"upload_time": "2024-08-14T04:55:55",
"upload_time_iso_8601": "2024-08-14T04:55:55.256832Z",
"url": "https://files.pythonhosted.org/packages/20/e2/956621c2b0d085076d9c3d3c8a76229610e8cee70dd7ebba7f628f1c110b/clustice-0.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "87b7f1fd11a2878ee12ae7c1a68411a1d12242c57b7281a5da6f2fbf2bef62ab",
"md5": "2d88ad775d18e73ba56a1d943a368a3e",
"sha256": "1a8c796f862941c2dacbe29644a1cf58e3436c2b03e421b803decb661d40e234"
},
"downloads": -1,
"filename": "clustice-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "2d88ad775d18e73ba56a1d943a368a3e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 9864,
"upload_time": "2024-08-14T04:55:57",
"upload_time_iso_8601": "2024-08-14T04:55:57.114006Z",
"url": "https://files.pythonhosted.org/packages/87/b7/f1fd11a2878ee12ae7c1a68411a1d12242c57b7281a5da6f2fbf2bef62ab/clustice-0.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-14 04:55:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vitroid",
"github_project": "ClustIce",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "clustice"
}