Open farhi opened 7 years ago
May use either of:
An example that runs with LAMMPS:
export LAMMPS_COMMAND="/usr/bin/mpirun -np 24 /usr/bin/lammps"
then: # ipython
from ase import Atoms, Atom
from ase.calculators.lammpsrun import LAMMPS
a = [6.5, 6.5, 7.7]
d = 2.3608
NaCl = Atoms([Atom('Na', [0, 0, 0]),
Atom('Cl', [0, 0, d])],
cell=a, pbc=True)
calc = LAMMPS()
NaCl.set_calculator(calc)
print(NaCl.get_stress()) # but LAMMPS remains active... ??
# now the MD
from ase.md.verlet import VelocityVerlet
import ase
dyn = VelocityVerlet(NaCl, dt=5.0 * ase.units.fs,trajectory='md.traj', logfile='md.log')
dyn.run(1000) # take 1000 steps
MPI use does not seem to work properly, but
export LAMMPS_COMMAND="/usr/bin/lammps"
is OK. Execution time is:
Could use GROMACS-Matlab interfaces ? Use ASE to read e.g. CIF and export to Gromacs (only GRO file). Topology file will still be needed ?
then would run GROMACS externally, and finally read results.
Can also use gmxdump
to convert to text and process in Matlab.
We can run with any calculator with syntax:
this simplifies the integration of non supported calculators.
See also some additional LAMMPS/ASE examples with 'lammpsrun' as above.
GROMACS procedure to run MD is explained in the attached file
using water as example. Could this be automated by coupling to e.g. ASE ?
inquire for MD using ASE couple with MDANSE python script to get Sqw, DOS, MSD...