charge in PDF calculations

Skip to first unread message

Annet B

Jan 23, 2023, 6:04:15 AMJan 23
to diffpy-users
Dear all,

I am trying to calculate the PDF from a xyz file (obtained from a molecular dynamics simulation). In my xyz file, the charge of each element is defined as well, but this is not accepted when applying 'loadStructure'. Is it actually possible to include charge in the diffpy PDF calculations?

Best wishes


Simon Billinge

Jan 26, 2023, 3:19:04 PMJan 26
Dear Annet,

I think that some ions are represented in the database but not all.  The program should raise an error if it can't find an ion.  The difference in scattering between the ions and the uncharged atoms tends to be quite small and in most cases you can get a very satisfactory fit using the atom instead of the ion.  In that case you would have to write a script to strip the +/- off the name of the atom/ion in your input file.  You may also add user-supplied atoms/ions.  I don't quite recall how to do that, but you may find it if you dig in the documentation.  Does anyone else remember?


You received this message because you are subscribed to the Google Groups "diffpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Simon Billinge
Professor, Columbia University

Mikkel Juelsholt

Jan 27, 2023, 12:56:49 PMJan 27
to diffpy-users
The easy way is to replace the atom with an atom with more electrons. E.g. to describe O2- you can replace it with Ne. 

Simon Billinge

Jan 27, 2023, 12:58:30 PMJan 27
Thanks so much Mikkel.....

Gill, Simerjeet

Jan 30, 2023, 9:50:12 AMJan 30

Hello Diffpy Community,


I'm looking for a postdoc to join our dynamic team at Nuclear Science and Technology Department at Brookhaven National Laboratory. Seeking materials scientist with experience in synchrotron methods to study nuclear materials in extreme environments. Follow the link below to submit an application



For inquiries, please feel free to reach me at



Thank you,


Simerjeet K.Gill

Group leader,

Nuclear Science and Technology Department,

Brookhaven National Lab,

Upton, NY 11973

Reply all
Reply to author
0 new messages