'Mg': 0, 'Al': 0, 'Si': 0, 'P': 0, 'S': 0, 'Cl': 0, 'Ca': 0, 'In': 0, 'Au': 0, 'X': 0 } ang2bohr = 1.8897269 bohr2ang = 1. / ang2bohr na = outputTools.countNumAtoms(input_) nmlwc = outputTools.countNumMLWC(input_) #print 'N atoms=', na #na=na+nmlwc #print 'N atoms=', na searchterm = 'Origin' ox = 0. oy = 0. oz = 0. for line in L: num_matches = string.count(line, searchterm) if num_matches: words = string.split(line) ox = eval(words[2]) oy = eval(words[3])
############################################## # count number orbitals def getNumOrbitals(L): searchterm = 'Number of states' for line in L: ## loop over lines of file num_matches = string.count(line, searchterm) if num_matches: word = string.split(line) no = eval(word[4]) break return no ############################################## na = outputTools.countNumAtoms(output) print '#', na, ' atoms' searchterm1 = 'IONIC POSITIONS AND FORCES' searchterm2 = 'Stepper Forces' previous_coords = [] coords = [] names = [] for i in range(0, na): previous_coords.append(0) coords.append(0) names.append(0) for line in range(lo): ## loop over lines of file num_matches1 = string.count(Lo[line], searchterm1)