# Hydroxylated alpha-alumina (Example 2 in published paper)

# Create cell and add symmetry-unique atoms
newModel("alumina");
cell(11.854, 2.904, 5.622, 90, 103.83, 90);
newAtomFrac(Al, 0.6595, 0, 0.3165);
newAtomFrac(Al, 0.9166, 0, 0.2073);
newAtomFrac(O, 0.8272, 0, 0.4272);
newAtomFrac(O, 0.495, 0, 0.2526);
newAtomFrac(O, 0.1611, 0, 0.0984);

# Pack and replicate cell
spacegroup("C2/m");
pack();
replicate(0, 0, 0, 6, 21, 3);

# Create 001 surfaces
adjustCell("c", 20.0);
rebond();

# Hydroxylate uppermost (in z) aluminium atoms
# Select, copy, and paste twice, transmuting to O and H
selectNone();
selectType(Al, "nbonds=3");
for (Atom i=aten.model.atoms; i; ++i) if (i.rz < 10.0) deSelect(i);
copy();
paste(0, 0, 2.0);
transmute(O);
paste(0.9422, 0.0, 2.3350);
transmute(H);
selectNone();

rebond();
