McStasMcXtrace / iFit

a simple library to analyze data (with McCode and Phonons/DFT hooks). :warning: this project has been moved to https://gitlab.com/soleil-data-treatment/soleil-software-projects/remote-desktop
http://ifit.mccode.org
Other
5 stars 5 forks source link

Models: Classical MD: initial steps #90

Open farhi opened 7 years ago

farhi commented 7 years ago

inquire for MD using ASE couple with MDANSE python script to get Sqw, DOS, MSD...

farhi commented 6 years ago

May use either of:

farhi commented 6 years ago

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
farhi commented 6 years ago

MPI use does not seem to work properly, but

export LAMMPS_COMMAND="/usr/bin/lammps"

is OK. Execution time is:

farhi commented 6 years ago

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.

farhi commented 5 years ago

We can run with any calculator with syntax:

this simplifies the integration of non supported calculators.

farhi commented 5 years ago

See also some additional LAMMPS/ASE examples with 'lammpsrun' as above.

farhi commented 5 years ago

GROMACS procedure to run MD is explained in the attached file

README.txt

using water as example. Could this be automated by coupling to e.g. ASE ?