Topology data

Assigning topology data (i.e. how atoms are connected) to a structure might be required, for example to run simple molecular dynamics simulations. This can be applied even when structural coarse-graining isn’t required, such as for zeolites.

Let’s load the zeolite MEP net, find neighbours using a cut-off, and save the file in LAMMPS data format.

>>> from chic import Structure
>>> mep = Structure.from_cif("MEP.cif")
>>> mep.get_neighbours_by_cutoff(rcut=1.8) # Ā
>>> mep.find_atomic_clusters()
>>> mep.get_coarse_grained_net()
>>> mep.net_to_lammps_data("MEP.data", write_bonds=True, write_angles=True)
../_images/mep.png

The bonds and angles will automatically be clustered into unique types. Here is the header of the file we wrote

# 'MEP' generated by CHIC (2024-05-05 12:40:36.512531)

138 atoms
184 bonds
198 angles
0 dihedrals
0 impropers

2 atom types
1 bond types
4 angle types
0 dihedral types
0 improper types

# Average bond length information:
# type 1: 1.609 Å

# Average bond angle information:
# type 1: 109.492 degrees
# type 2: 179.007 degrees
# type 3: 166.402 degrees
# type 4: 146.246 degrees

0.0                  13.705  xlo xhi
0.0                  13.705  ylo yhi
0.0                  13.705  zlo zhi

Masses

1 15.9994 # O
2 28.0855 # Si

What if we only wanted the Si nodes of the network? One easy way would be to simply delete the bridging oxygen atoms, and connect up Si nodes. We can do this with a careful chosen neighbour list.

>>> mep.remove_sites_by_symbol("O") # remove bridging oxygens
>>> mep.get_neighbours_by_cutoff(by_element_pair={("Si", "Si"): (2.5, 3.5)})
>>> mep.find_atomic_clusters(max_intra_bond_length=0.5, max_inter_bond_length=3.5)
>>> mep.get_coarse_grained_net()
>>> mep.net_to_lammps_data("MEP-nodes.data", write_bonds=True, write_angles=True)
../_images/mep-nodes.png

Similarly, the bonds and angles will be assigned to unique types.

# 'net' generated by CHIC (2024-05-05 21:49:10.040247)

46 atoms
92 bonds
134 angles
0 dihedrals
0 impropers

1 atom types
1 bond types
2 angle types
0 dihedral types
0 improper types

# Average bond length information:
# type 1: 3.188 Å

# Average bond angle information:
# type 1: 108.120 degrees
# type 2: 125.884 degrees

0.0                  13.705  xlo xhi
0.0                  13.705  ylo yhi
0.0                  13.705  zlo zhi