def withPbc(testfile="supper.pdb", args=''): a = Pdb(testfile) b = a.parser() b.assignAtomTypes() b.assignEleTypes() b.assignIdNumbers() b.toFrac() #b.translate(12.0, "z") toXyz(b, "out.xyz") toMusic(b, "out.music") if len(b.pbc) == 0: b.geotag = "BIOGRF 200" else: b.geotag = "XTLGRF 200" toReaxLammps(b, "lammps.data") toGeo(b, "sim.geo") toMsd(b, "sim.msd") toPoscar(b, ) toCfg(b, ) toJdft(b, ) toTowheecoords(b) if args: if args.element: toPdb(b, "out.pdb", 1) else: toPdb(b, "out.pdb")
def main(): parser = argparse.ArgumentParser() parser.add_argument("fname", default="POSCAR", nargs="?", help="geo file name") args = parser.parse_args() poscar_file = args.fname a = Poscar(poscar_file) b = a.parser() b.assignAtomTypes() b.assignEleTypes() print b.getVol() #print b.pbc toXyz(b) toGeo(b, "geo") toPdb(b, "sim.pdb") toReaxLammps(b, "lammps.data") toJdft(b, "coords")
def main(): parser = argparse.ArgumentParser() parser.add_argument("fname", default="POSCAR", nargs="?", help="geo file name") args = parser.parse_args() poscar_file = args.fname a = Poscar(poscar_file) b = a.parser() b.assignAtomTypes() b.assignEleTypes() vol = b.getVol() mass = b.getMass() density = mass/vol*ATOMIC_MASS_CONSTANT*1e27 print density #print b.pbc toXyz(b, "contcar.xyz") toGeo(b, "geo") toPdb(b, "sim.pdb") toReaxLammps(b, "lammps.data") toJdft(b, "coords")
def withPbc(testfile="supper.pdb", args=''): a = Pdb(testfile) b = a.parser() b.assignAtomTypes() b.assignEleTypes() b.toFrac() #b.translate(12.0, "z") toXyz(b, "out.xyz") toMusic(b, "out.music") if len(b.pbc) == 0: b.geotag = "BIOGRF 200" else: b.geotag = "XTLGRF 200" toReaxLammps(b, "lammps.data") toGeo(b, "sim.geo") toMsd(b, "sim.msd") toPoscar(b,) toCfg(b,) toJdft(b,) if args: if args.element: toPdb(b, "out.pdb", 1) else: toPdb(b, "out.pdb")