Units for Interfacial Suface Free Energy

269 views
Skip to first unread message

Daniel Dolce

unread,
Jul 13, 2021, 10:25:23 AM7/13/21
to PLUMED users
Hello everyone,
I am trying to determine the interfacial surface free energy of an aluminum alloy using LAMMPS and PLUMED. The trajectory file produced by LAMMPS has units of Angstroms and I want to use this trajectory file in PLUMED. I looked it up and the default unit in PLUMED is nanometers. From example code, they used UNITS NATURAL, but I just don't understand what this does or what units it produces. It turns the default of nanometers and other default units to off so that's all I know.
Any help would be greatly appreciated.
Thank you very much,
Daniel

Gareth Tribello

unread,
Jul 13, 2021, 10:45:36 AM7/13/21
to plumed...@googlegroups.com
Hello

The command UNITS NATURAL tells PLUMED that you are using natural units and that many physical constants are set equal to 1.  This is probably not what you want to do.

It is difficult to comment on your calculation without knowing what the units are in the trajectory file that you are using.  If the trajectory file is a format like pdb which will always be in Angstroms then PLUMED will do the conversion for you.  The one exception is if your input file is in xyz format.  PLUMED expects an xyz file to be in nm.  You can change this by doing:

plumed driver —ixyz mytraj.xyz —trajectory-units=A

Importantly the length unit in the plumed input file will then be nm.  If you want the unit in the plumed input to be Angstroms you put the command:

UNITS LENGTH=A

at the top of the PLUMED input.

To summarise, there are two things you need to think about when it comes to units:

(1) What are the units of the trajectory file?  These are often determined by the file format for the type of trajectory file that you are using.  The only exception is if your output is an xyz file in which case you use —trajectory-units.

(2) What are the units of length in the plumed input file?  By default lengths in the plumed input are always in nm.  You can change these units by using the UNITS command.

I hope this helps
Gareth

--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/1226caf0-24e6-41e1-bdad-3aca307e1e5en%40googlegroups.com.

Daniel Dolce

unread,
Jul 13, 2021, 1:18:46 PM7/13/21
to PLUMED users
Thank you for the quick response. I am sorry my response is so delayed. My trajectory file is a .xyz file so I used the command you suggested:

plumed driver --plumed plumed.dat --ixyz mytraj.xyz --trajectory-units=A

as well as changing the PLUMED input top line to UNITS LENGTH=A. When I ran the program, it brought up the debugging:

ERROR in input for command line tool driver : --trajectory-units=A option is unknown

Usage: driver < inputFile
inputFile should contain one directive per line.  The directives should come from amongst the following

With this I changed the command to:

plumed driver --plumed plumed.dat --ixyz mytraj.xyz --length-units=A

and it ran the code. I have the old files produced when the PLUMED input top line was UNITS NATURAL and when I campared the old file to the new one, the values are exactly the same. Did I do something wrong? Also the hyperlink takes you to a google doc with the entire PLUMED code used as well as some of the trajectory.xyz file used for clarification.

Gareth Tribello

unread,
Jul 14, 2021, 4:23:26 AM7/14/21
to plumed...@googlegroups.com
Hello

Yes sorry I got the command wrong for driver well done for working it out.  I think that the values are the same with UNITS NATURAL is to be expected.  What happens in a normal calculation is as follows

Trajectory read in -> converted from trajectory unit to nm -> converted to unit specified by UNITS command (A).

If you do UNITS NATURAL you simply read in the trajectory and don’t do any conversion.

In your case though you are doing A - > nm -> A, which is equivalent to multiplying by 1.

Does it make sense?

Gareth

 

Daniel Dolce

unread,
Jul 14, 2021, 11:49:20 AM7/14/21
to PLUMED users
Hello again,
If I understand this correctly, essentially I could use UNITS NATURAL or UNITS LENGTH=A and I will get the same thing? This is important because I am trying to obtain a value from all this data and it is off by a magnitude of 10  from the expected value when I use UNITS NATURAL. I thought the issue might be with the file transfer to PLUMED. If the units are in nanometers, then it solves this issue because I was accounting for Angstroms, but if the units end up not mattering in this case then I will have to keep looking for my error.

Pablo Piaggi

unread,
Jul 14, 2021, 11:58:10 AM7/14/21
to PLUMED users
Hi Daniel,

Surface free energy (sigma) is typically reported in mN/m or mJ/m^2 or erg/cm^2 which are all the same. If you obtain the free energy of the interface (DeltaF) in kJ/mol then the formula is:

sigma [mJ/m^2]= DeltaF[kJ/mol]*1000/(2*6.02*L_x[A]*L_y[A])

Where 6.02 comes from Avogadro's number and the 2 takes into account the fact that you typically have two interfaces. This formula depends on the geometry that you are using. Here I am assuming two planar interfaces in the x-y plane.

I hope you find this discussion helpful.

Best,

Pablo

Daniel Dolce

unread,
Jul 14, 2021, 12:24:10 PM7/14/21
to PLUMED users
Hello Pablo,
Thank you for the quick reply. I do know that the surface free energy is reported in mJ/m^2, at least those are the specific units I want to achieve. However, the specific formula in which I am deriving this surface free energy contains the area of the surface in which, according to the original trajectory.xyz file, was in Angstroms.

When I analyzed the data, I obtained a value of 1.50e-19 J/Å^2. When I do the necessary conversion I obtain a value of 15,000 mJ/m^2 which is off by a magnitude of 10^2. But, if the units PLUMED produces are in nm, then the actual obtained value would be 1.50e--19 J/nm^2 in which, after the necessary conversion, becomes 150 mJ/m^2 which is a desirable number.

All I want to know is if PLUMED is changing my units from the original Angstroms to nanometers due to the trajectory.xyz file, and if so, how do I make PLUMED read my trajectory.xyz file as Angstroms and produce numbers in Angstroms.

Gareth Tribello

unread,
Jul 14, 2021, 12:29:51 PM7/14/21
to plumed...@googlegroups.com
How are you passing the size of the box to PLUMED?

Gareth

Daniel Dolce

unread,
Jul 14, 2021, 12:39:21 PM7/14/21
to PLUMED users
Through NBINS=64,64,202 parameter in MULTICOLVARDENS. These values were obtained from the Lattice Parameters produced in the trajectory.xyz file.
Reply all
Reply to author
Forward
0 new messages