Contact angle measurement for water on silver layer

29 views
Skip to first unread message

Ankit Mathanker

unread,
Nov 11, 2024, 5:27:56 PM11/11/24
to Tools from yuxiangwang321
Hi All

I am trying to use the Contact angle tools to calculate the contact angle of water on a single layer of silver slab. I am doing this calculation on GROMACS with 420 water and 2000 silver atoms.
I used the default setting for cac and used index from my system. I tried changing the conditions too but in all the cases my contact angle is 180. The reason being I always get the value for solidPlane layerRadius h as 0. 0. 0.
********************** file: md.gro md.trr **********************
Command: cac md.gro md.trr xz 49999 499999 2500 {index 4001 to 5260} 3 0.0324 0.1 3 0.5 0.5
frameID  solidPlane  layerRadius  h  contactAngle
99999 0.00 0.00 0.00 180.00

********************** file: md.gro md.trr **********************
Command: cac md.gro md.trr xz 99999 499999 2500 {index 4001 to 5260} 3 1 0.2 0.2 0.5 0.5
    molDistance = 1.0
         sphere = 0.2
      threshold = 0.006702059
      thickness = 0.5
          slice = 0.5

---------------- frameID: 99999 ----------------
             CA = 180, No Contact


It seems like as if the script is not reading the solid slab somehow? Any thoughts on this. I have attached file1 and file2.
https://drive.google.com/drive/folders/1Ywu0tDikQnPflnWZZyTmIfvl7GQ6bucq?usp=sharing 

Y. Wang

unread,
Nov 12, 2024, 5:44:38 AM11/12/24
to Ankit Mathanker, Tools from yuxiangwang321
Hi Ankit,

Thank you for trying the code. I checked your file and found several errors in the command.

1. You used wrong plane, you should use xy plane in the command;

2. You used wrong indexes. I see you have 7780 atoms, in which there are 1260 water molecules, you should include all their atom indexes since all water molecules participate in the formation of droplet. And please note, in VMD, the index starts from 0, and in the command, you must start from the first atom index of water molecules, in your case, it is 4000 not 4001, so your atomselection should be {index 4000 to 7779}

3. You should try other "thicknessFactor" value, 0.5 in your case is too small. I tried 1.1 and got the following results (also see the command I used):


********************** file: md.gro md.trr **********************
Command: cac md.gro md.trr xy 0 1000 100 {index 4000 to 7779} 3 0.0324 0.1 3 1.1 0.5

frameID  solidPlane  layerRadius  h  contactAngle
0 0.00 27.55 25.41 85.38
100 0.00 0.21 42.03 179.43
200 0.00 28.23 24.74 82.46
300 0.00 27.55 25.41 85.38

You should understand the parameter "thicknessFactor", it means how to define a thickness of a contact area and ensure there are a proper number of water atoms (not necessary full molecules) in the contact area, so the code can construct an equivalent contact area according to the area the atoms occupy. The code calculates this thickness according to ''thicknessFactor*molDistance'' (in your case molDistance = 3.136787, you can find this value in the log.dat file). But, how to find a proper thicknessFactor? Here you need to load your model into VMD, and try different thickness yourself. I first roughly checked the distance from the solid plane (in your case, the solid plane is z=0) to a bottom water atom, it is nearly 2.3A, so in this case, you cannot use 0.5 since thicknessFactor*molDistance=0.5*3.136787 < 2.3, you should ensure thicknessFactor*molDistance at least 1A larger than the distance from solid plane to the bottom liquid atom, for example 3.45A. Then you check if this thickness sufficient, see the snapshots, I feel it seems to be a little bit smaller, you can further optimise it. So thicknessFactor= 3.45/3.136787=1.1. 

1731407976809.jpg
 2024-11-12_213418.jpg
2024-11-12_213427.jpg

I think this should inspire you. If you still have problems, leave message here.

Best regards,
Yuxiang


--
You received this message because you are subscribed to the Google Groups "Tools from yuxiangwang321" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tools-from-yuxiang...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tools-from-yuxiangwang321/9e6fee5e-98ec-4fc0-a0d3-fb3b6ca49e48n%40googlegroups.com.

Ankit Mathanker

unread,
Nov 12, 2024, 3:30:44 PM11/12/24
to Tools from yuxiangwang321
Hi Yuxiang

Thank you very much, this is very useful. I do have a followup question for same system with a small tweek. Now if I replace some of my water molecules with a salt the system will have both water and salt. The contant angle should be a resultant of water and salt(NACL). I am trying to use two cases: first where I consider the index of only water and keep the atomNumberInMol 3, and second where I have index of water and salt too but in this case I am not sure what should be my atomNumberInMol should be? On keeping the same value to 3 I do find a significant shift in contact angle between two cases.

Ankit

start.gro
Reply all
Reply to author
Forward
0 new messages