def view(self): if self.type == 'nc': view(self.data) elif self.type == 'gau': view(Atoms(numbers = self.data.atomnos, positions = self.data.atomcoords[-1]))
# Find maximum distance in all dimensions and factor by 2 xx, yy, zz = zip(*nn) cellSize = [2*(max(xx)+2), 2*(max(yy)+2), 2*(max(zz)+2)] gatoms.set_cell(cellSize) gatoms.center() # Now view to check cell #view(gatoms) # Now set up the Jacapo calculator for gatoms calc = Jacapo(atoms = gatoms, pw = 300, kpts = (1,1,1), nc = gauNC, ft = 0.01) gatoms.set_calculator(calc) view(gatoms) nBands = int(calc.get_valence() * 0.65 + 4) calc.set_nbands(nBands) calc.write_nc(nc = gauNC) print 'Conversion complete.'