# Initialises modules
from chemsh import *
import numpy

# Defines original MgO cluster
mgo = Fragment(coords='ss-mgo_shells_regions.pun', connect_mode='ionic')

# Deletes one Mg ion and substitutes with Li to form a Li-doped MgO cluster
mgo.names[0] = 'Li1'
mgo.znums[0] = 3

# Displaces the Lithium ion by a numpy vector
mgo.coords[0] += numpy.array([0, -0.4, 0])

# Saves the optimized cluster to disc
mgo.save('Li_MgO-cluster.pun', 'pun')

