# XtalOpt pwscf issues

It seems that the pwscf conversion in avogadro and openbabel still
doesn’t work right. Although with your fix, the cell is right the
atoms are still in the wrong position. The optimized structure from
pwscf is:

CELL_PARAMETERS (bohr)
4.507093641 -0.266262656 0.167140429
0.372175295 6.246211265 -0.031489012
1.998453477 2.402877155 10.999750249

ATOMIC_POSITIONS (crystal)
C 0.513967181 0.917621231 0.886014461
C 0.634766375 0.139103401 0.644958211
C 0.978076318 0.674844331 0.957822020
C 0.315173806 0.271158807 0.284275006
C 0.851017044 0.514023717 0.212507742
C 1.194530878 1.049940564 0.525396101
H 0.636190462 0.458456786 0.642917998
H 0.807781791 0.755276361 0.299510339
H 0.193498549 0.730471155 0.527918656
H 0.359434723 1.036520772 0.196419986
H 0.021690310 0.433421384 0.870894447
H -0.529992138 0.152415991 0.973753034
End final coordinates

2.38506 -0.14090 0.08845
0.19695 3.30536 -0.01666
1.05754 1.27155 5.82083
which is OK in angstroms
but it for says

Cartesian
C 4.42867 7.72379 9.80295
C 4.20164 2.24961 7.19609
C 6.57360 6.25632 10.67803
C 2.08955 2.29287 3.17109
C 4.45161 3.49474 2.46359
C 6.82460 7.50255 5.94582
H 4.32284 4.23908 7.16383
H 4.52040 5.22222 3.40577
H 2.19900 5.77968 5.81631
H 2.39831 6.85060 2.18801
H 1.99951 4.79412 9.56960
H -0.38600 3.43295 10.61766

The correct fractional coordinates are those shown above in the pwscf output
C 0.513967181 0.917621231 0.886014461
etc.

The avogadro editor shows fractional atoms as:

C 0.0287455401 0.2659505775 0.6743215697
C 0.8004679113 0.7371334264 0.2187922003
C 0.1517078840 0.7247318524 0.8100180739
C 0.4044092381 0.4875852225 0.5372009589
C 0.3918144308 0.0286382924 0.4015809319
C 0.7426691062 0.0159042841 0.9928531982
H 0.7977770493 0.1336441299 0.2149367688
H 0.4735172711 0.5727376775 0.5659916785
H 0.6343421158 0.6196121747 0.9976197915
H 0.3207690201 0.0412634970 0.3711793830
H 0.9590117934 0.1809536336 0.6457487711
H 0.0015382831 0.7119754771 0.8401227624

Something is not right it seems!

When I look at the structure in crystalmaker it looks totally
different than in avogadro. Attached is the CIF file generated by
findsym. If I read this cif file into avogadro the structure looks the
same as crystalmaker. So it seems to be a problem reading the pwscf
output file still.

Attached is the good cif file from findsym and the pwscf output, and
the bad cif file generated by obabel.

I appreciate any help!!

Ron

Ronald Cohen
Geophysical Laboratory
Carnegie Institution
Washington, D.C. 20015
rcohen@carnegiescience.edu
office: 202-478-8937
skype: ronaldcohen

On Fri, Jul 31, 2015 at 4:28 PM, Patrick Avery psavery@buffalo.edu wrote:

Ah I see. Yeah, my code actually checks for “no units specified in
CELL_PARAMETERS card” instead of “DEPRECATED”, but I believe they do the
same kind of thing.

I attached an example for one of my basic outputs. I used babel to convert
it to a POSCAR as well (using your pwscfformat.cpp for ron-xtal2.out-POSCAR
and mine for pat-xtal2.out-POSCAR). I noticed that I got a different volume
for yours for some reason (78.00842 A^3 instead of 21.7215 A^3). It does
print in xtal2.out that the volume is 21.7215 A^3 as well. So be careful
about that! It might be your line that says “conv = BOHR_TO_ANGSTROM;”.

Thanks,
Patrick

On Fri, Jul 31, 2015 at 4:04 PM, Cohen, Ronald rcohen@carnegiescience.edu
wrote:

Yes, here is one:

DEPRECATED: no units specified in CELL_PARAMETERS card

Ron

Ronald Cohen
Geophysical Laboratory
Carnegie Institution
Washington, D.C. 20015
rcohen@carnegiescience.edu
office: 202-478-8937
skype: ronaldcohen

On Fri, Jul 31, 2015 at 3:47 PM, Patrick Avery psavery@buffalo.edu
wrote:

It looks like there might be more than one DEPRECATED line that can be
printed with CELL_PARAMETER. I think you’re right and I might need to
update
mine to include all deprecated lines (right now it only looks at one).

On Fri, Jul 31, 2015 at 3:11 PM, Patrick Avery psavery@buffalo.edu
wrote:

Could I get a copy of an output with the deprecated warning?

On Fri, Jul 31, 2015 at 2:51 PM, Cohen, Ronald
rcohen@carnegiescience.edu wrote:

Thank you so so much! I have a slightly different solution that may be
equivalent, but may take care of a few more cases. In any event, I am
not sure if yours handles the new “DEPRECATED” warning when one tries
to enter CELL PARAMETERS as well as celldm(1) . What do you think? I
have attached my xtal.out (without the DEPRECATED warning) and my
pwscf format. Thanks!

Ron

Ronald Cohen
Geophysical Laboratory
Carnegie Institution
Washington, D.C. 20015
rcohen@carnegiescience.edu
office: 202-478-8937
skype: ronaldcohen

On Fri, Jul 31, 2015 at 12:59 PM, Patrick Avery psavery@buffalo.edu
wrote:

Hi Ron,

Thanks for contacting us about the pwscf issues you are
experiencing!

couple of updates to the pwscfformat.cpp file in openbabel.
Hopefully
that
fixed the alat issue.

I found another issue in the process in which “CELL_PARAMETERS” was
now
being used at the beginning of the output file to make complaints
printing coordinates. I fixed that as well.

I tested a couple of conversions by using the command "babel
xtal.out
-oxyz"
and “babel xtal.out -oPOSCAR” to convert my own pwscf output,
xtal.out,
to
an xyz and a POSCAR file. It seemed to work fine now. Please note
that
there
may be a unit conversion from atomic units (or Bohr’s) to Angstroms
in
the
process.

You can check out my changes and try it out from my openbabel fork
at
https://github.com/psavery/openbabel.git. I sent a pull request to
openbabel
with these changes as well. Try it out and let me know if there are
still
unresolved problems.

Thanks,
Patrick