## This script constructs the solid-state MgO cluster

# Reads in MgO crystalline unit cell in punch format
mgo=Fragment(coords="mgo_shells_periodic.pun", connect_mode='ionic')

# Constructs cluster
cluster=mgo.construct_cluster(origin=0, radius_cluster=20.0, 
                              adjust_charge='coordination_scaled', 
                              radius_active=12.0, bq_margin=1.5, bq_density=8)

# saves new cluster in punch and .xyz format
cluster.save("ss-mgo_shells_cluster.pun","pun")
cluster.save("ss-mgo_shells_cluster.xyz","xyz")

