예제 #1
0
#L.fix("thermofix3","clustergr","langevin",Temp,Temp,0.05, 2614,"zero","yes")
#L.fix("thermofix3","clustergr","temp/csvr",Temp,Temp,0.1,12345)

nodispl = 0
nosputt = 0
displacement = False

# save starting coordinates:
(startnPart1, startnPart2, nPartsub, startcoords1, startcoords2, coordssub,
 startindices1, startindices2, indicessub) = getcoords()
startcoords = np.append(startcoords1, startcoords2, axis=0)

# Output starting geometry:
L.dump("Startgeom", "all", "custom", 1, "Startgeom_Full" + ".xyz", "id",
       "type", "x", "y", "z", "vx", "vy", "vz", "c_K", "c_P", "c_coordno")
L.dump_modify("Startgeom", "first", "yes", "pad",
              10)  # Schreib' beim nullten Schritt ein File raus
L.dump_modify("Startgeom", "element", "Au", "Ni", "C")
L.dump_modify("Startgeom", "pbc",
              "yes")  # remap atoms via periodic boundary conditions
L.run(0)
L.undump("Startgeom")

L.dump("Startgeom", "all", "xyz", 1, "Startgeom" + ".xyz")
L.dump_modify("Startgeom", "first", "yes", "pad",
              10)  # Schreib' beim nullten Schritt ein File raus
L.dump_modify("Startgeom", "element", "Au", "Ni", "C")
L.dump_modify("Startgeom", "pbc",
              "yes")  # remap atoms via periodic boundary conditions
L.run(0)
L.undump("Startgeom")
예제 #2
0
    py_lmp.variable(micelle_group, 'atom',
                    '"type == {:d}"'.format(sol_tip_bead_type))
    py_lmp.group(micelle_group, 'dynamic', simulation.rods_group, 'var',
                 micelle_group, 'every', out_freq)
    micelle_compute = "micelle_ID"
    if hasattr(run_args, 'micelle_cutoff'):
        micelle_cutoff = run_args.micelle_cutoff
    else:
        SS_tip_int_key = model.eps[(sol_tip_bead_type, sol_tip_bead_type)][1]
        SS_tip_int_range = model.int_types[SS_tip_int_key][1]
        micelle_cutoff = 2 * model.rod_radius + SS_tip_int_range
    py_lmp.compute(micelle_compute, micelle_group, 'aggregate/atom',
                   micelle_cutoff)

# OUTPUT
dump_elems = "id x y z type mol"
try:
    dump_elems += " c_" + micelle_compute
except:
    pass
py_lmp.dump("dump_cmd", "all", "custom", out_freq, '"' + dump_path + '"',
            dump_elems)
py_lmp.dump_modify("dump_cmd", "sort id")
py_lmp.thermo_style("custom", "step atoms", "pe temp")
py_lmp.thermo(out_freq)

# RUN ...
py_lmp.run(args.simlen)

MPI.Finalize()