elastic constants

Hi,

I am new to calculating elastic constants.

There is a script in examples/comb that says:

copy lines after this to any input script for elastic calculations

Elastic constants calculations: strain box, measure box stress

strain x, measure s_x, s_y, s_z, s_yz:

calculates C11, C12, C13 and C14

fix 2 all deform 1 x scale 1.0001 remap x
compute perfx all stress/atom NULL pair
compute fx all reduce sum &
c_perfx[1] c_perfx[2] c_perfx[3] &
c_perfx[4] c_perfx[5] c_perfx[6]
thermo_style custom step lx ly lz xy xz yz &
c_fx[1] c_fx[2] c_fx[3] c_fx[4] c_fx[5] c_fx[6]
run 10

and so on.

When I run this program, how can I find these values?

Are the c_fx[1] and so on values representing the C11 values?

I am struggling to identify which data is the data I am after.

You should use the elastic.f90 in the same directory ($LAMMPS/examples/comb). Compile it, and run the executable. Since it is not maintained, some modifications may be necessary.

An alternative is to use the ELASTIC example ($LAMMPS/examples/ELASTIC, which will print elastic constants upon successful execution.

Ray

Yes,

it seems that the executable cannot read the log files.

gfortran -o elastic.f90 log.lammps

returns

/usr/bin/ld:log.lammps:1: syntax error
collect2: error: ld returned 1 exit status

Yes,

it seems that the executable cannot read the log files.

gfortran -o elastic.f90 log.lammps

What do you mean by this? Do you mean you wish your executable to be named
"log.lammps"?

You need to do it in two steps.

compiler elastic.f90 -o EXECUTABLE_NAME

then

./EXECUTABLE_NAME

Ray

Yes,

it seems that the executable cannot read the log files.

gfortran -o elastic.f90 log.lammps

One other thing, this is not the correct sequence of commands. The -o must
come after the input source file.

If gfortran does not work, try ifort.

Ray

When I do a:

gfortran elastic.f90 -o Elastic, I received this output.

elastic.f90:20.132:

ox(1,j))(box(4,j)/box(1,j))-(box(6,j)/box(3,j))(box(6,j)/box(3,j)-(box(5,
1
Error: Expected array subscript at (1)
elastic.f90:81.132:

ox(1,j))(box(4,j)/box(1,j))-(box(6,j)/box(3,j))(box(6,j)/box(3,j)-(box(5,
1
Error: Expected array subscript at (1)
elastic.f90:106.132:

/box(1,j))(box(4,j)/box(1,j))-(box(6,j)/box(3,j))(box(6,j)/box(3,j)-(box(
1
Error: Expected array subscript at (1)
elastic.f90:131.132:

/box(1,j))(box(4,j)/box(1,j))-(box(6,j)/box(3,j))(box(6,j)/box(3,j)-(box(
1
Error: Expected array subscript at (1)

Please see my previous email.

Ray

When I do a:

gfortran elastic.f90 -o Elastic, I received this output.

elastic.f90:20.132:

ox(1,j))*(box(4,j)/box(1,j))-(box(6,j)/box(3,j))*(box(6,j)/box(3,j)-(box(5,
                                                                           1
Error: Expected array subscript at (1)
elastic.f90:81.132:

ox(1,j))*(box(4,j)/box(1,j))-(box(6,j)/box(3,j))*(box(6,j)/box(3,j)-(box(5,
                                                                           1
Error: Expected array subscript at (1)
elastic.f90:106.132:

/box(1,j))*(box(4,j)/box(1,j))-(box(6,j)/box(3,j))*(box(6,j)/box(3,j)-(box(
                                                                           1
Error: Expected array subscript at (1)
elastic.f90:131.132:

/box(1,j))*(box(4,j)/box(1,j))-(box(6,j)/box(3,j))*(box(6,j)/box(3,j)-(box(
                                                                           1
Error: Expected array subscript at (1)

please try:

gfortran -ffree-line-length-none

by default even in free format gfortran truncates lines are column 132
(as demanded by the fortran standards).

axel.

I was downloading ifort, then saw Dr. Kohlmeyer’s email. His suggestion worked, and the elastic constants were computed.

Thank you both for your time and helping me with this problem.

Are these calculations meant for 0K and 0atm or have they been shown to work at ambient conditions?

Of course, I will do my own testing as well.

I was downloading ifort, then saw Dr. Kohlmeyer's email. His suggestion
worked, and the elastic constants were computed.
Thank you both for your time and helping me with this problem.

Are these calculations meant for 0K and 0atm or have they been shown to work
at ambient conditions?

0K. please note that the scripts in examples/ELASTIC are more rigorous.

computing (effective) elastic constants at finite temperature is a
tricky business.

I have indeed experimented with ELASTIC before and I was not getting the values that I was hoping (expecting) to get. I found a paper that shows computed elastic constants (van Beest et al.) for SiO2. However, according to this script, and the one in ELASTIC, I am getting values ~4x higher than those reported. I am not sure the reasons causing these much higher values.

I have indeed experimented with ELASTIC before and I was not getting the
values that I was hoping (expecting) to get. I found a paper that shows
computed elastic constants (van Beest et al.) for SiO2. However, according
to this script, and the one in ELASTIC, I am getting values ~4x higher than
those reported. I am not sure the reasons causing these much higher values.

did the people in the paper use the same potential/model/parameters?

have you confirmed that you indeed have the correct initial structure
and a suitably large system to minimize finite size effects?
are you certain there are no unit conversion problems somewhere?

tiny details can often result in significant differences, so attention
to detail is important.

The units are metal, which is consistent with the script in examples/comb.

Reported elastic constant for C11 is 380.716 GPa according to script.
In paper, it is reported to be 8.68 dyn/cm^2 *10 ^11, which translates to 86.8 GPa.

The size is about 1,000 atoms.

I am not sure if this structure is the same as the one in the paper. I was using the minimization technique already coded in the script.

The potential is indeed the same.