Skip to main content

A tool to generate exotic ice clusters.

Project description

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). Install with pip3.

pip3 install clustice

Uninstallation

pip3 uninstall clustice

API

API manual is here.

Examples

Make an icosahedral ice cluster.

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clustice-0.7.2.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clustice-0.7.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file clustice-0.7.2.tar.gz.

File metadata

  • Download URL: clustice-0.7.2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.4 Darwin/24.1.0

File hashes

Hashes for clustice-0.7.2.tar.gz
Algorithm Hash digest
SHA256 637ed44c80b143425e81fe4580d53cf54ef7faa131e3da0ac347f83e367f420c
MD5 ca531b4d334ff3a5069322a4fcb739db
BLAKE2b-256 a23c1db5a822cf71896e1c988f945e2c0b3a709d68736f84a80276e0fadddb10

See more details on using hashes here.

File details

Details for the file clustice-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: clustice-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.4 Darwin/24.1.0

File hashes

Hashes for clustice-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e63a2f8717c5c39211397eaa8eae64affe2cd6be085361d1835b03f3e059fa89
MD5 668f8f81acf9509eed94ecd7a98f9b66
BLAKE2b-256 65b0f557825cc349eebd53c128d20ddcc07cf0508cd704ab39a000c2fb22adbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page