Package stallone.api.dynamics

Source Code of stallone.api.dynamics.DynamicsFactory

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package stallone.api.dynamics;

import static stallone.api.API.*;
import stallone.api.doubles.IDoubleArray;
import stallone.api.potential.*;
import stallone.dynamics.BrownianDynamicsEuler;
import stallone.dynamics.LangevinLeapFrog;
import stallone.dynamics.VelocityVerlet;

/**
*
* @author noe
*/
public class DynamicsFactory
{
    public IIntegratorThermostatted brownianDynamicsEuler(IEnergyModel model, IDoubleArray masses, double dt, double gamma, double kT)
    {
        IIntegratorThermostatted res = new BrownianDynamicsEuler(dt, gamma, kT);
        res.setEnergyModel(model);
        res.setMasses(masses);
        return(res);
    }

    public IIntegratorThermostatted langevinLeapFrog(IEnergyModel model, IDoubleArray masses, double dt, double gamma, double kT)
    {
        IIntegratorThermostatted res = new LangevinLeapFrog(dt, gamma, kT);
        res.setEnergyModel(model);
        res.setMasses(masses);
        res.setV(dyn.maxwellBoltzmannVelocities(masses, kT));
        return(res);
    }

    public IIntegrator velocityVerlet(IEnergyModel model, IDoubleArray masses, double dt)
    {
        IIntegrator res = new VelocityVerlet(dt);
        res.setEnergyModel(model);
        res.setMasses(masses);
        return(res);
    }
}
TOP

Related Classes of stallone.api.dynamics.DynamicsFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.