def main(argv=[]): args = getArgs(argv) atoms = read(args.file, format=args.format) if args.format else read(args.file) atoms = correct_z(atoms) atoms = fix_layers(atoms, args.fix, args.n_layers) kw = {'format': 'vasp', 'direct': True, 'vasp5': True, 'sort':True} write('POSCAR' + args.pad, atoms, **kw)
def main(argv=[]): args = getArgs(argv) # get slab atoms = read(args.slab) if args.slab else slab(args) # adjust cell atoms = correct_z(atoms) # set contraints if args.fix: atoms = fix_layers(atoms, args.fix, args.n_layers) # write POSCAR kw = {'format': 'vasp', 'sort': True, 'vasp5': True, 'direct': True} nam = 'POSCAR' + args.pad write(nam, atoms, **kw)