# Import the KohnSham module from ATK from ATK.KohnSham import * # Define function for handling molecule setup def waterConfiguration(angle,bondLength): from math import sin,cos theta = angle.inUnitsOf(radians) positions = [(0.0, 0.0, 0.0)*Angstrom, (1.0, 0.0, 0.0)*bondLength, (cos(theta), sin(theta), 0.0)*bondLength] elements = [Oxygen] + [Hydrogen]*2 return MoleculeConfiguration(elements,positions) # Setup water molecule h2o = waterConfiguration(104.5*degrees, 0.958*Angstrom) # Open a VNL file and add the molecule to it vnl_file = VNLFile("h2o.vnl") vnl_file.addToSample(h2o, "h2o")