Pages

29 November 2019

657. More on charges in nwchem and gaussian

A now ten-year old paper introduced the concept of Pauling bond-strength conserving terminations (PBS ) in the use of molecular codes for calculations involving extended crystalline systems ('Quantum-Chemical Calculations of Carbon-Isotope Fractionation in CO2(g), Aqueous Carbonate Species, and Carbonate Minerals' by James R. Rustad, Sierra L. Nelmes, Virgil E. Jackson, and David A. Dixon --  see link). The authors used NWChem for the calculations, most likely due to the affiliation between the lead author and PNNL, where NWChem is developed, and where the researchers have been banned from using Gaussian.

I use Gaussian almost exclusively these days, mainly due to how fast it is.

Unfortunately, Gaussian and NWChem behave quite differently when it comes to introduction of specified nuclear charges, so I here compare the two codes in terms of how to set up PBS calculations.

NWChem (6.8):
scratch_dir /scratch
Title "charge"

Start  charge

echo

charge 0

geometry noautosym noautoz units angstrom
 Mg     0.00000     0.00000     0.00000
 O     0.00000     2.09000     0.00000
 O     1.47785     2.22045e-16     1.47785
 O     -1.47785     -1.11022e-16     1.47785
 O     0.00000     -2.09000     0.00000
 O     -1.47785     2.22045e-16     -1.47785
 O     1.47785     -1.11022e-16     -1.47785
 H1     -0.691981     2.65500     -0.691981 charge 0.5 
 H1     0.691981     2.65500     0.691981 charge 0.5 
 H1     1.87737     0.978609     1.87737 charge 0.5 
 H1     1.87737     -0.978609     1.87737 charge 0.5 
 H     -1.18539     7.33956e-09     2.56935
 H     -2.56935     -7.33957e-09     1.18539
 H     -0.691981     -2.65500     0.691981
 H     0.691981     -2.65500     -0.691981
 H     -1.87737     -0.978609     -1.87737
 H     -1.87737     0.978609     -1.87737
 H     1.18539     -2.20187e-08     -2.56935
 H     2.56935     2.20187e-08     -1.18539
end

basis "ao basis" spherical print
  H library "def2-svp"
  Mg library "def2-svp"
  O library "def2-svp"
END

dft
  mult 1
  direct
  XC pbe0
  grid xfine
  mulliken
end

task dft energy   

This gives an energy of -655.860806066326.

Removing the charges for H1 and setting the total charge to +2 gives an energy of -657.044328628867

Gaussian (16.A01):
WRONG:
%nprocshared=6
%Mem=800000000
%Chk=charge.chk
#P GFINPUT rPBE1PBE/def2svp 5D  NoSymm  Punch=(MO) Pop=(full) 

charge

0 1 ! charge and multiplicity
 Mg     0.00000     0.00000     0.00000
 O     0.00000     2.09000     0.00000
 O     1.47785     2.22045e-16     1.47785
 O     -1.47785     -1.11022e-16     1.47785
 O     0.00000     -2.09000     0.00000
 O     -1.47785     2.22045e-16     -1.47785
 O     1.47785     -1.11022e-16     -1.47785
 H(znuc=0.5)     -0.691981     2.65500     -0.691981
 H(znuc=0.5)     0.691981     2.65500     0.691981
 H(znuc=0.5)     1.87737     0.978609     1.87737
 H(znuc=0.5)     1.87737     -0.978609     1.87737
 H     -1.18539     7.33956e-09     2.56935
 H     -2.56935     -7.33957e-09     1.18539
 H     -0.691981     -2.65500     0.691981
 H     0.691981     -2.65500     -0.691981
 H     -1.87737     -0.978609     -1.87737
 H     -1.87737     0.978609     -1.87737
 H     1.18539     -2.20187e-08     -2.56935
 H     2.56935     2.20187e-08     -1.18539

gives an energy of -655.679686484!

However,
2 1  ! charge and multiplicity
gives an energy of -655.860712881, which is what we want.

Removing the znuc specifications and using
2 1  ! charge and multiplicity
gives an energy of -657.044229333

Keeping the znuc specifications and defining those protons as fragment 2, and the rest of the cluster as fragment 1
 2 1 -2 1 4 1! charge and multiplicity
gives an energy of -655.860712881


Conclusion: 
both NWChem and Gaussian can be made to use PBS, but while you use the intended cluster charge (0) in NWChem, you need to use the unmodified charge (+2) in gaussian.

29 September 2019

656. Rant: On Academia and the English language

I used to think that (postgraduate) students didn't know how to write good manuscripts because they don't learn how to do so during their undergraduate education. I'm now even more cynical about it -- I believe that we actually actively teach them bad practices instead.

1. Honours students are particularly problematic, since they haven't yet had to write a thesis and are mainly exposed to scientific writing in the form of lab reports. Unfortunately, the way lab reports are written does not resemble any form of document that the students will produce in the career -- whether they go into industry or academia. So what's the point? Sure, they get to do a bit of thinking about the science behind the experiment in the process of writing -- and that's great -- but it does not teach them how to write up science.

2. The biggest problem is that students, regardless of level, are often told to write a certain number of words as part of their academic assignments --'write at least 800 words'. The idea is to make sure that they put in enough work, but the outcome is that you get papers with a lot of filler words and phrases.

I had a masters (by research) student write something along the lines of 
"'During the first week(s) of the course, a literature search will be conducted where appropriate sources are gathered'"
instead of
"Targets will be synthesised according to literature procedures"

It would be better to give students assignments where they are told what must be addressed in their essays, and then graded accordingly if they do a bad job of it. If they can complete the task in 400 words instead of 600, so be it.

I now tell my students to read Orwell's "Politics and the English language" in order to learn how to write, as it deals with this directly, and contains some great examples.

3. Postgraduate science writing courses are often geared towards teaching students to write popular science texts, and are often given by people outside their fields. Firstly, they are PhD students and first need to be able to write about science as experts before learning to write pop sci -- they WILL need to do the former, but are unlikely to need to do the latter. Secondly, (bad) pop sci writing often ends up being so devoid of actual information that it's impossible for someone in the field to figure out what it's about -- the way the Nobel prize in chemistry is presented in the newspapers is often so short on detail that it's impossible to know what the discovery is.

4.  Role models are hard to find. Few students think that the type of writing they see in social media works for science, but they might not realise that journalists are great sinners along the lines of point 2. Authors of fiction vary in quality, and I find it hard to read modern literature because of how self-indulgent many authors are.

I tell students at the beginning of their postgraduate course to have a look at some of the papers that they read when doing the initial literature search for their research, pick out one good and one bad example, and then try to work out WHY they felt that way.