User Tools

Site Tools


exercises:2017_ethz_mmm:pythonmd

This is an old revision of the document!


The instructions for loading the appropriate modules in .bashrc:
> cd
> nano .bashrc
module load new gcc/4.8.2 python/2.7.12 # include this line in the file
> . .bashrc

To visualize an xyz file:

> ipython

In [1]: from ase.io import read
In [2]: from ase.visualize import view
In [3]: s=read("file.xyz")
In [4]: view(s)

At this point you can rotate the structure, select an atom, then two (you get the distance) or three (you get the angle)…

 STAMI 

In the repository you will find the program “md.py” and the geometry file “fcc.xyz” The program md.py can perform a MD simulation for a system of Ar atoms interacting via Lennard-Jones potential.

Executing the command

>python md.py

the program will ask you to provide

  1. the name of a geometry file
  2. the timestep to be used for the simulation in [fs]
  3. the total number of steps of dynamics to be performed
  4. the initial temperature desired for the system in [K]
exercises/2017_ethz_mmm/pythonmd.1488516458.txt.gz · Last modified: 2017/03/03 04:47 by dpasserone