magnuss
Hi!
I’ve been trying to solve a structure with Simulated Annealing in Topas 6 and got a growing suspicion that the use of distance restraints was preventing atoms from approaching special positions.
To test it out on a very simple case, I’ve simulated powder X-ray diffraction data for NaCl and tried to solve the NaCl structure from only the first 5 peaks. Without any distance restraints and so few peaks, the SA easily gets trapped in false minima with excellent fits to the data but completely nonsense structures.
If I put a distance restraint on the Na-Cl distances with the atomic_interaction keyword, the correct structure is quickly found. However, if I put restraints on the Na-Na and Cl-Cl distances, the SA never arrives at the right solution. Using the keyword ai_no_self_interation, which should prevent interaction between atoms in equivalent positions, does not help. Actually, regardless of the use of ai_so_self_interact, the penalty is identical to the one given by the macro AI_Anti_Bump, e.g.:
atomic_interaction ai1 = (R-3)^2; : 20283.2927`
ai_sites_1 Na
ai_sites_2 Na
ai_radius 3
ai_no_self_interaction
penalty = ai1; :20283.2927`
atomic_interaction ai2 = (R-3)^2; : 20283.2927`
ai_sites_1 Na
ai_sites_2 Na
ai_radius 3
'ai_no_self_interation (commented out)
penalty = ai2; :20283.2927`
AI_Anti_Bump(Na*, Na*, 3, 1) : 20283.2927`
Is the ai_no_self_interation not working, or am I not using it right? If I understand it correctly, ai1 above should always be zero since I’ve only introduced one Na site in the model and hence all Na-Na interactions are from atoms in equivalent positions. Any help help would be greatly appricated.
Best regards,
Magnus
PS. I do use occ_merge to facilitate merging of atoms at special positions.
Edit: Attached INP file. Data file is attached in reply since I don't manage to attach second file here.
magnuss
The (simulated) data file is attached.
alancoelho
Hi Magnus
You have found a bug; I will do some more investigations and then get back to you. Apologies for the inconvenience and strange this has not been brought to my attention.
cheers
alan
alancoelho
Hi Magnus
ai_no_self_interation is not working. The bug has been foxed for Version 7 to be released in the future but fir teh present
and I can only reommend a work-aroud. The work-aroud involves writing neagtive penalties for self interactions.
For example, consder three sites:
site Cl1
site Cl2
site Na1
atomic_interaction ai1 ...
ai_sites_1 Cl*
ai_sites_2 Cl*
...
penalty = ai1;
If you wanted to have ai_no_self_interation ON then include penalties to cancel out the self intercatiions; ie.
atomic_interaction ai1_1 ...
ai_sites_1 Cl1
ai_sites_2 Cl1
...
penalty = -ai1_1;
atomic_interaction ai1_2 ...
ai_sites_1 Cl2
ai_sites_2 Cl2
...
penalty = -ai1_2;
cheers
alan
magnuss
Thanks for the work-around, Alan!
I have a related follow-up question: Is it a way to relax or remove a distance penalty if the atoms involved get closer together than a certain distance? This could also be very useful to facilitate merging of atoms despite distance restraints.
Best,
Magnus
alancoelho
Hi Magnus
For two atoms O1 and O2 say, then to remove a distance penalty using sites_distance then you would use the following:
sites_distance d_o1_o2 load site_to_restrain { O1 O2 }
local = d_o1_o2; : 0 ' report the distance
penalty = If (d_o1_o2 < 0.5, 0, (d_o1_o2 - 0.5)^2);
You can further scale the penalty relative to other penalty depending on what you are doing.
If using atomic_interaction then you would write a similar equation; ie.
atomic_interaction d_o1_o2 = If(R < 0.5, 0, (R - 0.5)^2);
...
cheers
alan