Пример #1
0
def write_xyz(time):
    # print the current line to file
    with open(xyz_file, 'a') as f:
        print(N, file=f)
        print(time, file=f) # xyz format for VMD requires a line here, and ignores it; I put the time here.
        for e,a in zip(element_names, atoms):
            x = box.diff(a.x, sim.vec())
            print(e, *x, file=f)
Пример #2
0
def write_xyz(time):
    # print the current line to file
    with open(opts.xyz, 'a') as f:
        print(N, file=f)
        # xyz format for VMD requires a line here, and ignores it; I put the time here.
        print(time, file=f)
        for a in atoms:
            x = box.diff(a.x, sim.vec())
            print('C', *x, file=f)
Пример #3
0
def write_xyz(time):
    # print the current line to file
    with open(opts.xyz, 'a') as f:
        print(N, file=f)
        # xyz format for VMD requires a line here, and ignores it; I put the time here.
        print(time, file=f)
        for a in atoms:
            x = box.diff(a.x, sim.vec())
            print('C', *x, file=f)
Пример #4
0
def write_xyz(time):
    # print the current line to file
    with open(xyz_file, 'a') as f:
        print(N, file=f)
        print(
            time, file=f
        )  # xyz format for VMD requires a line here, and ignores it; I put the time here.
        for e, a in zip(element_names, atoms):
            x = box.diff(a.x, sim.vec())
            print(e, *x, file=f)