Phonon frequencies as observables

Hi all,

I would like to include phonon frequencies as an observable for potential fitting, but I’m struggling to understand the format of the `frequency’ tag. In the example given, we have

frequency 2
1 0.0
6 902.0 2

I assume the ‘2’ beside ‘frequency’ indicates there are two frequencies to follow. Is it true that the first column then enumerates the frequencies in increasing order? If this is the case, why is it ‘1 6’ instead of ‘1 2’?

Furthermore, the second mode has a number ‘2’ in the third column, while the first mode has nothing there. Is the default value equal to 1?

If I wanted to include the mode frequencies of eg. MgO at the gamma point as an observable, would the frequency section look something like:

frequency 3
1 0.0 1 100.0
2 396.0 1 100.0
3 733.0 1 100.0

My apologies for the novice questions. Thank you for all your help!

Connor

Hi Connor,

You are correct that the 2 after frequency means that 2 lines of input are expected. The format for the frequency input on each line is:

frequency_number frequency_value k_point_number weight

i.e. up to 4 pieces of information. The frequency numbers don’t have to be consecutive and so if you only want to fit the 1st and 6th frequency then you give 1 and 6, rather than having to go 1,2,3,4,5,6. For example, for a diatomic molecule the 6th frequency would be the stretching mode and therefore the one you would want to fit whereas 1-3 are translation (i.e. zero) and 4 & 5 are rotation (also zero if “eckart” is used as a keyword).

The third number is the k point. If you are working with molecules then this is not needed since there is no k point, but if working with solids and multiple k points then it’s important. The fourth number is an optional weight for fitting.

Based on this, your input for MgO would be wrong since the first 3 modes at gamma are all zero and so there is no way you could fit modes 2 and 3.

Hope that helps,

Julian

Hi Dr. Gale,

Thank you, this is very helpful!

Best regards,

Connor

Hi Dr. Gale,

I had a follow-up question about this topic: is it possible to fit phonon frequencies for two or more configurations in the same file? When I try to do this, I get an error message. I will copy my input file and the error below. Thank you for your help.

fit conp comp abs
name ZnO
cell
3.429500 3.429500 5.206900 90.000000 90.000000 120.000000
fractional
Zn core 0.33333333 0.66666667 0.00054800
O core 0.33333333 0.66666667 0.37976200
O shel 0.33333333 0.66666667 0.37976200
space
186
kpoints 6
0.00000000 0.00000000 0.50000000
0.66666667 0.33333333 0.50000000
0.66666667 0.33333333 0.00000000
0.00000000 0.00000000 0.00000000
0.50000000 0.00000000 0.00000000
0.50000000 0.00000000 0.50000000
observables
elastic GPa
1 1 209.70 100.00
elastic GPa
1 2 121.10 100.00
elastic GPa
1 3 105.10 100.00
elastic GPa
3 3 210.90 100.00
elastic GPa
5 5 42.97 100.00
frequency 72

end

name MgO
cell
4.211700 4.211700 4.211700 90.000000 90.000000 90.000000
fractional
Mg core 0.000000 0.000000 0.000000
O core 0.500000 0.500000 0.500000
O shel 0.500000 0.500000 0.500000
space
225
kpoints 3
0.00000000 0.00000000 0.00000000
0.00000000 0.50000000 0.50000000
0.50000000 0.50000000 0.50000000
observables
elastic
1 1 297.08 100.0
elastic
1 2 95.36 100.0
elastic
4 4 156.13 100.0
frequency 17

end
species
Mg core 2.000000
Zn core 2.000000
O core 0.869020
O shel -2.869020
buck
O shel Zn core 851.655137 0.347783 0.00000 0.000 10.000 0 0 0
buck
O shel Mg core 1942.282497 0.275531 0.00000 0.000 10.000 0 0 0
buck
O shel O shel 22764.000000 0.149000 27.879000 0.000 12.000 1 1 1
spring
O 74.92 0

Error message

(there are no errors up to this point)
Maximum no. of cycles = 5000
Maximum step size = 1000.0000
Tolerance on parameters = 0.0000100
Tolerance on function = 0.0000100
Tolerance on gradient = 0.0001000
Differencing interval = 0.0001000

Start of fitting :

munmap_chunk(): invalid pointer

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0 0x7f88431efad0 in ???
#1 0x7f88431eec35 in ???
#2 0x7f8842de051f in ???
at ./signal/…/sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x7f8842e34a7c in __pthread_kill_implementation
at ./nptl/pthread_kill.c:44
#4 0x7f8842e34a7c in __pthread_kill_internal
at ./nptl/pthread_kill.c:78
#5 0x7f8842e34a7c in __GI___pthread_kill
at ./nptl/pthread_kill.c:89
#6 0x7f8842de0475 in __GI_raise
at …/sysdeps/posix/raise.c:26
#7 0x7f8842dc67f2 in __GI_abort
at ./stdlib/abort.c:79
#8 0x7f8842e276f5 in __libc_message
at …/sysdeps/posix/libc_fatal.c:155
#9 0x7f8842e3ed7b in malloc_printerr
at ./malloc/malloc.c:5664
#10 0x7f8842e3f05b in munmap_chunk
at ./malloc/malloc.c:3060
#11 0x7f8842e43519 in __GI___libc_free
at ./malloc/malloc.c:3381
#12 0x55eb96dc0fd0 in ???
#13 0x55eb96f5abad in ???
#14 0x55eb97a68fb7 in ???
#15 0x55eb972b0c0b in ???
#16 0x55eb972b3240 in ???
#17 0x55eb9722c8b4 in ???
#18 0x55eb972ac026 in ???
#19 0x55eb972a5811 in ???
#20 0x55eb980457a6 in ???
#21 0x55eb96db3745 in ???
#22 0x7f8842dc7d8f in __libc_start_call_main
at …/sysdeps/nptl/libc_start_call_main.h:58
#23 0x7f8842dc7e3f in __libc_start_main_impl
at …/csu/libc-start.c:392
#24 0x55eb96db3784 in ???
#25 0xffffffffffffffff in ???
Aborted (core dumped)

I didn’t post all the phonon frequencies in the interest of saving space, but I have the first 12 frequencies for ZnO formatted like:

frequency 72
1 80.0 1 100.0
2 80.0 1 100.0
3 80.0 1 100.0
4 80.0 1 100.0
5 182.0 1 100.0
6 182.0 1 100.0
7 427.0 1 100.0
8 427.0 1 100.0
9 427.0 1 100.0
10 427.0 1 100.0
11 562.0 1 100.0
12 562.0 1 100.0

Hi Connor,

If you can attach your full input file and the version number you are using I’ll take a look next week as I’m away from the office for a bit. The error message you are getting is a memory issue which means that either there is an allocation/deallocation issue or an array isn’t large enough for the case that you’ve thrown at it. Either way, the code should trap this ideally.
Regards
Julian

Hi Dr. Gale,

Thank you for your help. I’ve attached the full input file.

master.gin (3.2 KB)

Sorry, I forgot to mention I’m using v. 6.1.

Hi Connor,
Apologies for the delay but I think I’ve now fixed the issue that caused your master.gin input example to crash. There was a setup issue when using multiple configurations with phonons in a run where the structures aren’t optimised. I’ve now fixed this in 6.1 (6.1.1) and so if you update your copy of GULP then hopefully things will be OK. That said, the reason why you found the hiccup in the code (which is useful for me) is that you did something that I wouldn’t recommend, which is to fit frequencies without using “relax”. The reason is that the phonon frequencies only really mean something when the structure is at a minimum with respect to the internal energy, but unless your fit of the structure is perfect (i.e. the forces are all zero) then the frequencies won’t be being computed for a minimum. Therefore I’d strongly recommend you change your fit to include the “relax” keyword.
Cheers
Julian

Hi Dr. Gale,

Thank you very much for your help! I have one more follow-up question: when I ran my script on v6.1.1 of GULP, including the “relax” keyword, I got the error

Largest core-shell distance exceeds cutoff of cuts

I eliminated this by increasing “cuts” to 1.5. The input file then ran correctly barring the warning message:

**** No lower sum of squares could be found ****
Final sum of squares = 7566829.97308
Final gradient norm = 964252.964307
WARNING : Not all configurations optimised successfully in relaxed fit

Is this warning any cause for concern? If it is, is there anything I can change to eliminate it?

Thank you again,

Connor Wilson

Hi Connor,

This warning is important since it means your fit isn’t valid as optimisations are failing. If you get the error about cuts being exceeded then it usually means your model has a problem. For relaxed fitting you need a model that is already good enough to give a successful optimisation and is stable. Given your large sum of squares, I’d guess that you probably need to find a better starting point before trying relaxed fitting.
Regards,
Julian