def test(): """test code""" testfile = "a666.data" a = ReaxData(testfile) b = a.parser() c = LdhProject(b) c.re1()
def read_data(datafile): """read data file """ a = ReaxData(datafile) b = a.parser() b.assignAtomTypes() b.assignEleTypes() return b
def read_data(): datafile = "lammps.data" a = ReaxData(datafile) b = a.parser() b.assignAtomTypes() return b
def read_data(datafile): a = ReaxData(datafile) b = a.parser() b.assignAtomTypes() return b
! file containing the atom types + diameters ! file containing the coordinates ! probe size in A ! number of insertions ! length of unitcell ! crystal density in g / cm3 ! scale factor cut off ! surface atom cut off ! coordinatin files ! neighbor list files """ datafile = "lammps.data" a = ReaxData(datafile) b = a.parser() b.assignAtomTypes() natoms = len(b.atoms) pbc = b.pbc o = open("cn.inp", "w") lines = CN lines = lines.replace("%natoms%", "%d"%natoms) o.write(lines) o.close() o = open("sas.inp", "w") lines = SAS tokens = " ".join(["%.4f"%i for i in pbc[:3]])
""" Replace the Ca in CaO crystal to creat a Ca-rich LDO (Ca:Al=7:1) This is for LDH project """ from data import ReaxData from output_conf import toReaxLammps from tools import LdhProject for i in range(100): testfile = "a666.data" a = ReaxData(testfile) b = a.parser() c = LdhProject(b) c.re_al = 8 c.re1() b.assignAtomTypes() toReaxLammps(b, "case%02d.data" % i)