exercises:2018_ethz_mmm:lennard_jones_cluster_2018
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:2018_ethz_mmm:lennard_jones_cluster_2018 [2018/02/22 14:18] โ dpasserone | exercises:2018_ethz_mmm:lennard_jones_cluster_2018 [2020/08/21 10:15] (current) โ external edit 127.0.0.1 | ||
---|---|---|---|
Line 6: | Line 6: | ||
+ | <note tip> | ||
+ | All files of this exercise be downloaded directly from the wiki: {{exercise_1.1.zip|}} | ||
+ | </ | ||
- | < | + | Download the 1.1 exercise into your **EXERCISES** folder and unzip it. |
- | max@qmobile: | + | |
- | </ | + | |
- | + | ||
< | < | ||
- | ================================================================== | + | max@qmobile:~$ cd ; cd EXERCISES |
- | m_addcolumn | + | max@qmobile:~$ wget http://www.cp2k.org/ |
- | Description: | + | max@qmobile:~$ unzip exercises:2018_ethz_mmm:exercise_1.1.zip |
- | add a column at the left of a file, the same string in every line. | + | max@qmobile:~$ cd exercise_1.1 |
- | Usage: | + | |
- | m_addcolumn string < file > file.out | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_cutlines | + | |
- | Description: | + | |
- | Cuts lines l1..l2, l3..l4, l5..l6 away from a file | + | |
- | Usage: | + | |
- | m_cutlines l1 l2 l3 l4 l5 l6 ... < file > modified_file | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_domyslab | + | |
- | Description: | + | |
- | starting from a unit cell file with Element x y z columns, generate a nx ny nz cell. The parameter d is the nearest neighbor distance, and the cell lengths Lx, Ly, Lz are in the same units as in the unit cell file. Since d is used to multiply all coordinates, | + | |
- | Usage: | + | |
- | m_domyslab Lx Ly Lz d nx ny nz < unitcell > slab.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_interpolate | + | |
- | Description: | + | |
- | Returns a list of real numbers that interpolates two given extremes A and B with n+1 points (from A=0 to B=n) | + | |
- | Usage: | + | |
- | m_interpolate xa xb n | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_multiply | + | |
- | Description: | + | |
- | Returns the product of two numbers | + | |
- | Usage: | + | |
- | m_multiply num1 num2 | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_overlayer | + | |
- | Description: | + | |
- | Replaces the 4th column (z coordinate) of a file with a user-given new z coordinate. | + | |
- | Usage: | + | |
- | m_overlayer newz < overlayer.xyz > newoverlayer.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_replace | + | |
- | Description: | + | |
- | Replaces all occurrencies of an " | + | |
- | Usage: | + | |
- | m_replace " | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_trimlines | + | |
- | Description: | + | |
- | trims around lines l1..l2, l3..l4, l5..l6 of | + | |
- | Usage: | + | |
- | m_trimlines l1 l2 l3 l4 l5 l6 ... < file > modified_file | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzcenter | + | |
- | + | ||
- | + | ||
- | Description: | + | |
- | Centers a sample in the directions specified by a 1, and not in those specified by a 0 | + | |
- | Usage: | + | |
- | m_xyzcenter flagx flagy flagz < cell.xyz > cell_center.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzminmax | + | |
- | Description: | + | |
- | This function returns the maximum and minimum X (or Y, or Z) value from a XYZ file | + | |
- | Usage: | + | |
- | m_xyzminmax x|y|z < file.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzrefold | + | |
- | + | ||
- | Description: | + | |
- | Refolds a sample according to periodic boundary conditions in all directions marked by 1 | + | |
- | The cell is defined by a,b,c in the second line of the xyz file | + | |
- | Usage: | + | |
- | m_xyzrefold markx marky markz < filein.xyz > fileout.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyztranslate | + | |
- | + | ||
- | Description: | + | |
- | Translates all coordinates of a xyz file by a given vector. | + | |
- | Usage: | + | |
- | m_xyztranslate tx ty tz < filein.xyz > fileout.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_atan2 | + | |
- | Description: | + | |
- | Returns the angle in degrees between the positive X-axis of a plane and the point given by the coordinates (x,y) on it: | + | |
- | + | ||
- | \ | + | |
- | \ | + | |
- | * (x,y) | + | |
- | \ | + | |
- | \ | + | |
- | | + | |
- | \ | | + | |
- | | + | |
- | --\----------------------> | + | |
- | | + | |
- | + | ||
- | Usage: | + | |
- | m_atan2 x y | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_distance | + | |
- | Description: | + | |
- | Computes the distance between two points | + | |
- | Usage: | + | |
- | m_distance x1 y1 z1 x2 y2 z2 | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_functions.bash | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_lattice | + | |
- | + | ||
- | Description: | + | |
- | Replicates a cell in 3 directions and generates a sample with the cell lengths a b c in the second line | + | |
- | IT ONLY READS THE LINES WITH EXACTLY 4 COLUMNS (atomic index, x, y, z) | + | |
- | Usage: | + | |
- | m_lattice [Atom] cellx celly cellz nx ny nz < cell > sample.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_norm | + | |
- | Please specify three arguments | + | |
- | Description: | + | |
- | Returns the norm of a vector | + | |
- | Usage: | + | |
- | m_norm x y z | + | |
- | + | ||
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_pdbtorsion | + | |
- | Description: | + | |
- | Returns torsion defined by 4 atoms in a pdb file | + | |
- | | + | |
- | / | + | |
- | < | + | |
- | | + | |
- | | + | |
- | / \__/ | + | |
- | / | + | |
- | / | + | |
- | | + | |
- | + | ||
- | Usage: | + | |
- | m_pdbtorsion n1 n2 n3 n4 file | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_scalar | + | |
- | Description: | + | |
- | Returns scalar product of two vectos | + | |
- | Usage: | + | |
- | m_scalar x1 y1 z1 x2 y2 z2 | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_unitvec | + | |
- | Description: | + | |
- | Returns a normalized input vector | + | |
- | Usage: | + | |
- | m_unitvec x y z | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzcountframes | + | |
- | Description: | + | |
- | This function counts the number of frames in a trajectory | + | |
- | Usage: | + | |
- | m_xyzcountframes file.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyznatoms | + | |
- | Description: | + | |
- | This function returns the number of atoms in a given XYZ file | + | |
- | Usage: | + | |
- | m_xyznatoms < file.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzrescale | + | |
- | + | ||
- | Description: | + | |
- | Rescales all coordinates of a xyz file by a given factor. If the cell is given in the second line it is multiplied by the same factor | + | |
- | Usage: | + | |
- | m_xyzrescale factor < filein.xyz > fileout.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzzhistogram | + | |
- | Description: | + | |
- | This function makes a z histogram of a trajectory | + | |
- | Usage: | + | |
- | m_xyzzhistogram n_intervals n_atoms z_min z_max | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_change | + | |
- | Please specify three arguments | + | |
- | Description: | + | |
- | Adds a delta times an integer to a central value | + | |
- | Usage: | + | |
- | m_change x0 n delta | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_divide | + | |
- | Description: | + | |
- | Returns the ratio of two numbers | + | |
- | Usage: | + | |
- | m_ratio num1 num2 | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_getcolumn | + | |
- | Description: | + | |
- | Greps a string from a file and gets the last instance; then takes the nth column | + | |
- | Usage: | + | |
- | m_getcolumn " | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_list | + | |
- | Please specify two arguments | + | |
- | Description: | + | |
- | Creates an ordered list of numbers between two integers | + | |
- | Usage: | + | |
- | m_list nmin nmax | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_onecolumn | + | |
- | Description: | + | |
- | parse a file and write all words as a single column | + | |
- | Usage: | + | |
- | m_onecolumn < file | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_pdbvecjoin | + | |
- | Description: | + | |
- | Returns a vector joining | + | |
- | Usage: | + | |
- | m_pdbvecjoin at1 at2 pdbfile | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_sum | + | |
- | Description: | + | |
- | Returns the sum of two numbers | + | |
- | Usage: | + | |
- | m_sum num1 num2 | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_vecprod | + | |
- | Description: | + | |
- | Returns vector product of two vectors | + | |
- | Usage: | + | |
- | m_vecprod x1 y1 z1 x2 y2 z2 | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzframes | + | |
- | Description: | + | |
- | This function takes frames from a xyz file | + | |
- | Usage: | + | |
- | m_takeslides first_frame last_frame file.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzrand | + | |
- | + | ||
- | Description: | + | |
- | Randomizes a file xyz from -delta/2 to delta/2 | + | |
- | Usage: | + | |
- | m_xyzrand delta < file.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
- | ================================================================== | + | |
- | m_xyzsort | + | |
- | + | ||
- | Description: | + | |
- | Sorts a xyz file according to z, y, x coordinates (z is inverted) | + | |
- | Usage: | + | |
- | m_xyzsort < file.xyz > filesorted.xyz | + | |
- | ================================================================== | + | |
- | + | ||
- | + | ||
</ | </ | ||
- | Download the 1.1 exercise into your $HOME folder and unzip it. | ||
- | < | + | In this exercise |
- | you@eulerX ~$ wget http://www.cp2k.org/ | + | <note tip>[[doi>10.1063/1.478595]] |
- | you@eulerX ~$ unzip exercises: | + | |
- | </ | + | |
- | <!-- | + | |
- | <note tip> | + | |
- | All files of this exercise be downloaded from the wiki: {{exercise_1.1.zip|}} | + | |
</ | </ | ||
- | In this exercise you will test the Lennard-Jones potential. In particular, we will focus on the system described in the following paper about the energy landscape of the 38 atom Lennard-Jones cluster: | + | The command to run cp2k is the following (with a generic **file.inp** input file): |
- | <note tip>{{ : | + | |
- | </ | + | |
- | Login to euler using your nethz credentials. | + | |
- | Then go to the directory " | + | |
< | < | ||
- | you@eulerX | + | max@qmobile:~$ cp2k.ssmp -i file.inp -o file.out |
+ | </ | ||
- | |||
- | </ | ||
===== Geometry optimization | ===== Geometry optimization | ||
Line 501: | Line 146: | ||
<note important> | <note important> | ||
**1 Hartree=27.2114 eV**. | **1 Hartree=27.2114 eV**. | ||
- | In the input file, the epsilon value (depth of the well) is expressed in KT units, namely, in " | + | In the input file, the epsilon value (depth of the well) is expressed in KT units, namely, in " |
</ | </ | ||
<note tip> | <note tip> | ||
- | | + | - randomize the coordinate files **fcc.xyz** |
- | | + | - extract the q4 order parameter from **fcc.xyz** and from **fcc_rand.xyz** and compare the values. |
- | - extract the q4 order parameter from **fcc.xyz** and from **fcc_rand.xyz** and compare the values.< | + | - < |
- | python stein.py file.xyz </ | + | |
- before running the simulation, copy the input coordinate file into in.xyz < | - before running the simulation, copy the input coordinate file into in.xyz < | ||
- | - run cp2k < | + | |
- | - in the output file, note the final energy, **transform it in the unit of the paper (epsilon units)** | + | |
- | - load vmd module | + | - in the output file, grep the final energy |
+ | - Open vmd and play with the optimization trajectory < | ||
- apply the script **myq4** to the optimization trajectory: this generates a list of q4 and energies for the whole trajectory. < | - apply the script **myq4** to the optimization trajectory: this generates a list of q4 and energies for the whole trajectory. < | ||
- plot q4 and energies with **gnuplot** (ask the teacher) | - plot q4 and energies with **gnuplot** (ask the teacher) | ||
- have a look at the myq4 script < | - have a look at the myq4 script < | ||
- repeat for the ico.xyz starting point, don't forget to first copy/remove the files appropriately. For example: < | - repeat for the ico.xyz starting point, don't forget to first copy/remove the files appropriately. For example: < | ||
- | - finally, run the bash script < | + | - Run the bash script < |
+ | - create a FCC_OUT subdirectory (**mkdir FCC_OUT ; cd FCC_OUT**) and copy there the files you want to keep; then go back one dir (**cd ..**), delete all the OPT* files (**rm OPT* **) and repeat the exercise with ico.xyz | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 526: | Line 180: | ||
<note tip> | <note tip> | ||
- Report the energy of the minima, compare it with the ones of the initial configurations. | - Report the energy of the minima, compare it with the ones of the initial configurations. | ||
+ | - After converting the energy into " | ||
- Plot q4 vs. energy and q4 vs. optimization steps, for the two cases. Discuss the results. Are the minima in two separate basins? | - Plot q4 vs. energy and q4 vs. optimization steps, for the two cases. Discuss the results. Are the minima in two separate basins? | ||
- Report the value of the order parameter of the minumum, and discuss what you see | - Report the value of the order parameter of the minumum, and discuss what you see | ||
- Use " | - Use " | ||
</ | </ | ||
- | --> | + |
exercises/2018_ethz_mmm/lennard_jones_cluster_2018.1519309113.txt.gz ยท Last modified: 2020/08/21 10:15 (external edit)