예제 #1
0
    def __init__(self,sigma = 1,epsilon = 1):

        lennard_jones._obj_count += 1
        assert (lennard_jones._obj_count == 1),type(self).__name__ + " has more than one object"

        self.epsilon = epsilon
        self.sigma = sigma
        self.phi = LJ_term(self.epsilon, self.sigma)
        self.dpair_pbc = self.phi.dpair_pbc

        print('lennard_jones.py call potential')
        self._name = 'Lennard Jones Potential'

        # make a local copy of phase space, so as to separate dimensionless and non-dimensionless
        # copies of phase space
        self.dimensionless_phase_space = phase_space()

        print('lennard_jones initialized: sigma ',sigma,' epsilon ',epsilon)
예제 #2
0
    rthrsh = MD_parameters.rthrsh
    pthrsh = MD_parameters.pthrsh  # T = 1.0 is given

    # MD variables
    tau_cur = tau_short
    tau_short = tau_short
    tau_long = tau_long

    hamiltonian_type = MD_parameters.hamiltonian_type
    n_out_files = niter_tau_short // save2file_strike
    print('tau cur', tau_cur)

    # ML variables
    load_model_file = ML_parameters.ML_chk_pt_filename

    phase_space = phase_space.phase_space()

    if crash_checker == 'yes':
        if crash_thrsh == 'yes':
            crsh_chker = check4particle_soft_crash(rthrsh0, pthrsh0, rthrsh,
                                                   pthrsh, crash_path)
        else:
            crsh_chker = check4particle_hard_crash(rthrsh, pthrsh, crash_path)
    else:
        crsh_chker = check4particle_crash_dummy(rthrsh0, pthrsh0, rthrsh,
                                                pthrsh, crash_path)

    linear_integrator_obj = linear_integrator(MD_parameters.integrator_method,
                                              crsh_chker)

    hamiltonian_obj = make_hamiltonian(hamiltonian_type, tau_long,