Re: [Ifeffit] Fitting EXAFS simulation to experimental

2014-05-29 Thread Scott Calvin
Hi Carl,

I'm not sure what level you were asking your question from. Bruce provided an 
answer to one interpretation of the question.

If the question is, however, has anyone written an automated script that 
allows the user to choose parameters given to ATOMS as fitting parameters for 
all space groups, then my answer is that I'm not aware of that having been 
done.

For example, it is very easy to make the lattice parameter for a cubic space 
group be a fitting parameter, as changes to it will result in a uniform 
fractional change to the length of all paths, and the reff keyword makes it 
easy to implement a uniform fractional change. Plenty of people have computed 
the relationship between ATOMS parameters and path parameters for specific 
geometries (including more complicated ones), and used that for fitting.

But in each case that requires some effort to think about the geometry 
involved. That's different from having a script that allows you to designate a 
shift in, say, the x-coordinate in fractional coordinates of one kind of atom 
in the input file and automatically have that result in the generation of the 
correct function of that fitting parameter in each of the paths used in FEFF, 
including multiple-scattering paths. And that's the thing that I don't think 
currently exists.

--Scott Calvin
Sarah Lawrence College
 
On May 29, 2014, at 9:04 AM, Bruce Ravel bra...@bnl.gov wrote:

 On 05/28/2014 06:58 PM, Carl Brozek wrote:
 Dear listhost,
 
 I'm using Artemis as a front end for ATOMS and FEFF and I would like to
 build a simulated EXAFS spectrum based on experimental data I have. I
 know how to generate a simulation based on a .cif or .xyz file, but is
 it possible to vary parameters in these input geometries to best match
 the experimental?
 
 Has someone implemented this in artemis or matlab?
 
 thanks,
 
 
 Carl,
 
 In Artemis, this is called a VPath.
 
   http://bruceravel.github.io/demeter/artug/plot/vpaths.html
 
 You will need to import data of some sort because a VPath is created
 from paths that have been associated with a data set.
 
 Run Feff.  Drag and drop any number of paths from the Path tab in the
 Feff window onto your data Window.  Mark the paths paths you want to
 include in your VPath by clicking their little check buttons.  From
 the Actions menu, select Make VPath from marked.  This will prompt
 you for a name for the VPath and insert the VPath into the plotting
 list, as described in the page whose URL is given above.
 
 As for varying structural parameters, that is what we call a fit.
 You can parameterize the various Delta R parameters to represent
 changes in lattice positions.  There are plenty of examples of this
 using Ifeffit -- Daniel Haskel's papers on cuprate superconductors, my
 own papers on titanate perovskites, lots of work buy Anatoly Frenkel
 on various catalyst materials, Sam Webb's work on manganites, just to
 name a few.
 
 B
 
 
 
 -- 
  Bruce Ravel   bra...@bnl.gov
 
  National Institute of Standards and Technology
  Synchrotron Science Group at NSLS --- Beamlines U7A, X24A, X23A2
  Building 535A
  Upton NY, 11973
 
  Homepage:http://xafs.org/BruceRavel
  Software:https://github.com/bruceravel
 ___
 Ifeffit mailing list
 Ifeffit@millenia.cars.aps.anl.gov
 http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


Re: [Ifeffit] Fitting EXAFS simulation to experimental

2014-05-29 Thread Anatoly I Frenkel
Yes, it is possible to vary atomic positions in the fitting process and 
evaluate their effect on the fit, or just use them as adjustable parameters in 
the fit as any other fitting variables.

This process was historically started by Yizhak Yacoby (see papers from his 
group in the 1990s), who introduced structural distortions into the fit.

We had a somewhat similar approach in this work:

https://pubweb.bnl.gov/~frenkel/KNbO3/kno.pdf

where we have parameterized the fractional coordinates of oxygen atoms in the 
perovskite structure and traced their effect on EXAFS equation (most 
non-trivially, on the scattering amplitude of multiple scattering (Equations 
6,7)  paths, the rest was pretty trivial: Equations 4,5).

I think Bruce also had done such parameterization in some of his papers and in 
his Thesis.

Anatoly


From: ifeffit-boun...@millenia.cars.aps.anl.gov 
[ifeffit-boun...@millenia.cars.aps.anl.gov] on behalf of Scott Calvin 
[scal...@sarahlawrence.edu]
Sent: Thursday, May 29, 2014 10:40 AM
To: XAFS Analysis using Ifeffit
Subject: Re: [Ifeffit] Fitting EXAFS simulation to experimental

Hi Carl,

I'm not sure what level you were asking your question from. Bruce provided an 
answer to one interpretation of the question.

If the question is, however, has anyone written an automated script that 
allows the user to choose parameters given to ATOMS as fitting parameters for 
all space groups, then my answer is that I'm not aware of that having been 
done.

For example, it is very easy to make the lattice parameter for a cubic space 
group be a fitting parameter, as changes to it will result in a uniform 
fractional change to the length of all paths, and the reff keyword makes it 
easy to implement a uniform fractional change. Plenty of people have computed 
the relationship between ATOMS parameters and path parameters for specific 
geometries (including more complicated ones), and used that for fitting.

But in each case that requires some effort to think about the geometry 
involved. That's different from having a script that allows you to designate a 
shift in, say, the x-coordinate in fractional coordinates of one kind of atom 
in the input file and automatically have that result in the generation of the 
correct function of that fitting parameter in each of the paths used in FEFF, 
including multiple-scattering paths. And that's the thing that I don't think 
currently exists.

--Scott Calvin
Sarah Lawrence College

On May 29, 2014, at 9:04 AM, Bruce Ravel bra...@bnl.gov wrote:

 On 05/28/2014 06:58 PM, Carl Brozek wrote:
 Dear listhost,

 I'm using Artemis as a front end for ATOMS and FEFF and I would like to
 build a simulated EXAFS spectrum based on experimental data I have. I
 know how to generate a simulation based on a .cif or .xyz file, but is
 it possible to vary parameters in these input geometries to best match
 the experimental?

 Has someone implemented this in artemis or matlab?

 thanks,


 Carl,

 In Artemis, this is called a VPath.

   http://bruceravel.github.io/demeter/artug/plot/vpaths.html

 You will need to import data of some sort because a VPath is created
 from paths that have been associated with a data set.

 Run Feff.  Drag and drop any number of paths from the Path tab in the
 Feff window onto your data Window.  Mark the paths paths you want to
 include in your VPath by clicking their little check buttons.  From
 the Actions menu, select Make VPath from marked.  This will prompt
 you for a name for the VPath and insert the VPath into the plotting
 list, as described in the page whose URL is given above.

 As for varying structural parameters, that is what we call a fit.
 You can parameterize the various Delta R parameters to represent
 changes in lattice positions.  There are plenty of examples of this
 using Ifeffit -- Daniel Haskel's papers on cuprate superconductors, my
 own papers on titanate perovskites, lots of work buy Anatoly Frenkel
 on various catalyst materials, Sam Webb's work on manganites, just to
 name a few.

 B



 --
  Bruce Ravel   bra...@bnl.gov

  National Institute of Standards and Technology
  Synchrotron Science Group at NSLS --- Beamlines U7A, X24A, X23A2
  Building 535A
  Upton NY, 11973

  Homepage:http://xafs.org/BruceRavel
  Software:https://github.com/bruceravel
 ___
 Ifeffit mailing list
 Ifeffit@millenia.cars.aps.anl.gov
 http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


Re: [Ifeffit] Fitting EXAFS simulation to experimental

2014-05-29 Thread Matt Newville
Hi All,

As Scott, Bruce, Anatoly have said, it is certainly possible to map certain
crystallographic distortions to local structure, and so predict the effect
on EXAFS, and model EXAFS in terms of those distortions.

But to be clear for the original question, EXAFS is inherently a local
structure probe and is not actually sensitive to crystallographic
parameters.  That is, one *must* make the mapping from crystlalographic
parameters to local structure, often making important assumptions (such as
there is a crystal structure and I know what the space group is) that
EXAFS is not actually able to deny or confirm.

Anyway, yes it is certainly possible to do things like model the extent of
a tetragonal distortion.

--Matt
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


Re: [Ifeffit] Fitting EXAFS simulation to experimental

2014-05-29 Thread Matthew Marcus

I wonder if what he was asking about is an automated way of mapping the 
position parameters for a given space group, that is, fractional atomic 
coordinates as listed in a .cif, onto
the various path distances.  As it is now, it's impractically hard to do it 
except for very simple cases.  Maybe what is needed is a language for 
specifying local structures in which
atom positions and occupancies can be given by variables, and the program would 
automatically parameterize the paths.  As a hypothetical toy example, consider 
a simple model of
a substitutional model of Fe in bcc W (atoms chosen more or less at random).  
Here, we suspect that since Fe is a smaller atom than W, the first neighbors 
would be
displaced inward.  Thus, we might have a specification something like

SET a0 = 3.165  /* lattice parameter of pure W */
CENTRAL Fe 0 0 0
ATOM W  /* 1st NN */
POS a0*(1-dist1)*(sqrt(3),sqrt(3),sqrt(3))/2
OCC 1
SS SS1
ATOM W
POS a0*(1-dist1)*(-sqrt(3),sqrt(3),sqrt(3))/2
OCC 1
SS SS1
... add the other 6
ATOM W  /* 2nd NN */
POS a0*(1-dist2)*(1,0,0)
OCC 1
SS SS2
... add the other 5

The program would then automatically compute not only the distances for the SS 
paths, but those for the MS paths as well,
and perhaps even estimate the ss values based on the ss's for the shells.  This 
is a relatively trivial example in which the scripting isn't needed.
However, it gets bigger.  For instance, suppose that some of the 1NN atoms 
might have Fe on them.  Then, the W sites would have
OCC 1-xFe
and there would be ATOM Fe sites specifications like:
ATOM Fe
POS a0*(1-dist1Fe)*(sqrt(3),sqrt(3),sqrt(3))/2
OCC xFe
SS SS1Fe

and the program would automatically work up MS paths with the proper weighting 
for the number of W and Fe atoms involved.

Now, consider an octahedral cage in which the central atom may be off-center:

SET a0 = appropriate value
CENTRAL Ti a0*(d_off,d_off,d_off)/sqrt(3)
ATOM O
POS (a0/2)*(1+d1,d2,d2)
OCC 1
SS SS1
ATOM O
POS (a0/2)*(d2,1+d1,d2)
OCC 1
SS SS1
ATOM O
POS (a0/2)*(d2,d2,1+d1)
OCC 1
SS SS1
ATOM O
POS (a0/2)*(-1+d1,d2,d2)
OCC 1
SS SS1
...

The distortions shown are intended to keep the 3-fold symmetry about 111.  Now, 
when you consider the higher shells, you can see that it could get
pretty messy to work out what the distances would be as a function of d_off, 
even if you don't allow displacements of higher neighbors.
This sort of specification only becomes sort of practical because computers can 
now handle the multitudes of paths which will appear.  Funny
that the Vpath thing should have just got discussed; that tool would be 
extra-important for distorted structures.

For the POS parameters, the above are given in Cartesian coords, but it would 
be good to have the option to do it in crystal coords, invoking
the crystal symmetry.  I'm not sure how to do that for impurities.

I realize that this would be a HUGE job, but whoever does it would win the 
hearts of EXAFS people everywhere :-)
mam

On 5/29/2014 8:14 AM, Matt Newville wrote:

Hi All,

As Scott, Bruce, Anatoly have said, it is certainly possible to map certain 
crystallographic distortions to local structure, and so predict the effect on 
EXAFS, and model EXAFS in terms of those distortions.

But to be clear for the original question, EXAFS is inherently a local structure probe and is not 
actually sensitive to crystallographic parameters.  That is, one *must* make the mapping from 
crystlalographic parameters to local structure, often making important assumptions (such as 
there is a crystal structure and I know what the space group is) that EXAFS 
is not actually able to deny or confirm.

Anyway, yes it is certainly possible to do things like model the extent of a 
tetragonal distortion.

--Matt


___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


Re: [Ifeffit] Fitting EXAFS simulation to experimental

2014-05-29 Thread Scott Calvin
Dear Carl,

The short answer is yes, but it takes a little bit of effort.

One method is to actually figure out how stretching the c-axis impacts the 
lengths of each path geometrically, and then use the functions determine to 
express the delr's of each path in terms of the change in c. This method is 
rigorously correct, but requires digging in to the geometry, and entering 
somewhat lengthy expressions for many of the scattering paths.

A related method is to in effect use a first-order approximation of those 
changes. To do that, create two atoms files with slightly different values of 
c. Generate the corresponding paths, and see how the reff of those paths 
changes. For example, changing c by 0.01 might result in a certain path having 
a reff change by 0.014. Use the ratio of the change in reff to the change in c 
to scale the delr of those paths with respect to a guessed parameter delc. In 
the example I just provided the delr of the path in question would be chosen to 
be 1.4*delc.

The second method is, of course, approximate, but for small changes in a 
parameter such as c can work pretty well, and can be easier to implement than 
the first.

--Scott Calvin
Sarah Lawrence College


On May 29, 2014, at 12:33 PM, Carl Brozek bro...@mit.edu wrote:

 Dear All,
 
 Thank you for your responses so far and I apologize for not being clearer.
 
 Here is the problem at hand: I have a material that is best thought of as 
 organic, graphene-like 2-D sheets connected by infinite chains of Fe-S. Based 
 on PXRD and other techniques, we know the structure of the AB plane (the 2-D 
 organic part), but we aren't able to make sense of what is going on with the 
 Fe-S chain. We can simulate the PXRD based on proposed .cif files, but it's 
 off most likely because of the c direction (Fe-S chain).
 
 We collected Fe K edge XAS to tease out Fe-S bond angles and distances, 
 hoping we could feed this into our simulation for the PXRD to improve the 
 fit. 
 
 Modifying the ATOMS input by hand, by constructing different reasonable 
 geometries, was improving the simulation, but using a error minimization 
 fitting program would be best.
 
 So, is it possible to vary specific angles and distances between atoms along 
 the c-direction only in an error minimization program based on our 
 experimental data?
 
 I apologize if you have already responded to this reformulated question.
 
 best,
 Carl 


___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


Re: [Ifeffit] Fitting EXAFS simulation to experimental

2014-05-29 Thread Matt Newville
Hi Matthew,



On Thu, May 29, 2014 at 11:18 AM, Matthew Marcus mamar...@lbl.gov wrote:

 I wonder if what he was asking about is an automated way of mapping the
 position parameters for a given space group, that is, fractional atomic
 coordinates as listed in a .cif, onto
 the various path distances.  As it is now, it's impractically hard to do
 it except for very simple cases.


I completely agree.


  Maybe what is needed is a language for specifying local structures in
 which
 atom positions and occupancies can be given by variables, and the program
 would automatically parameterize the paths.  As a hypothetical toy example,
 consider a simple model of
 a substitutional model of Fe in bcc W (atoms chosen more or less at
 random).  Here, we suspect that since Fe is a smaller atom than W, the
 first neighbors would be
 displaced inward.


This is an excellent suggestion...


  Thus, we might have a specification something like

 SET a0 = 3.165  /* lattice parameter of pure W */
 CENTRAL Fe 0 0 0
 ATOM W  /* 1st NN */
 POS a0*(1-dist1)*(sqrt(3),sqrt(3),sqrt(3))/2
 OCC 1
 SS SS1
 ATOM W
 POS a0*(1-dist1)*(-sqrt(3),sqrt(3),sqrt(3))/2
 OCC 1
 SS SS1
 ... add the other 6
 ATOM W  /* 2nd NN */
 POS a0*(1-dist2)*(1,0,0)
 OCC 1
 SS SS2
 ... add the other 5

 The program would then automatically compute not only the distances for
 the SS paths, but those for the MS paths as well,
 and perhaps even estimate the ss values based on the ss's for the shells.
  This is a relatively trivial example in which the scripting isn't needed.
 However, it gets bigger.  For instance, suppose that some of the 1NN atoms
 might have Fe on them.  Then, the W sites would have
 OCC 1-xFe
 and there would be ATOM Fe sites specifications like:
 ATOM Fe
 POS a0*(1-dist1Fe)*(sqrt(3),sqrt(3),sqrt(3))/2
 OCC xFe
 SS SS1Fe

 and the program would automatically work up MS paths with the proper
 weighting for the number of W and Fe atoms involved.

 Now, consider an octahedral cage in which the central atom may be
 off-center:

 SET a0 = appropriate value
 CENTRAL Ti a0*(d_off,d_off,d_off)/sqrt(3)
 ATOM O
 POS (a0/2)*(1+d1,d2,d2)
 OCC 1
 SS SS1
 ATOM O
 POS (a0/2)*(d2,1+d1,d2)
 OCC 1
 SS SS1
 ATOM O
 POS (a0/2)*(d2,d2,1+d1)
 OCC 1
 SS SS1
 ATOM O
 POS (a0/2)*(-1+d1,d2,d2)
 OCC 1
 SS SS1
 ...

 The distortions shown are intended to keep the 3-fold symmetry about 111.
  Now, when you consider the higher shells, you can see that it could get
 pretty messy to work out what the distances would be as a function of
 d_off, even if you don't allow displacements of higher neighbors.
 This sort of specification only becomes sort of practical because
 computers can now handle the multitudes of paths which will appear.  Funny
 that the Vpath thing should have just got discussed; that tool would be
 extra-important for distorted structures.

 For the POS parameters, the above are given in Cartesian coords, but it
 would be good to have the option to do it in crystal coords, invoking
 the crystal symmetry.  I'm not sure how to do that for impurities.

 I realize that this would be a HUGE job, but whoever does it would win the
 hearts of EXAFS people everywhere :-)
 mam


Yes, that's a very nice way to do it, and I think such a distortion
language would be a great way to map the problem to EXAFS.  I think such
ideas have been kicked around for a long time, and I'm pretty sure
something like this was part of Bruce's motivation for Virtual Paths.

A confounding, persistent issue for many years was that Feff's pathfinder
(purposely?) loses all information about the atomic positions for a path.
Basically, the pathfinder needs to be able to retain the full path in order
to model distortions in the way you're talking about.  I believe Bruce's
pathfinder in Artemis does this.

I agree it's real work, but would be highly useful.

--Matt
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


Re: [Ifeffit] Fitting EXAFS simulation to experimental

2014-05-29 Thread Carl Brozek
Hi Scott,

Thanks a lot for the insight. It seems like it'll take a bit of work, but
I'm happy to hear it's doable.

best,
Carl


On Thu, May 29, 2014 at 12:54 PM, Scott Calvin scal...@sarahlawrence.eduwrote:

 Dear Carl,

 The short answer is yes, but it takes a little bit of effort.

 One method is to actually figure out how stretching the c-axis impacts the
 lengths of each path geometrically, and then use the functions determine to
 express the delr's of each path in terms of the change in c. This method is
 rigorously correct, but requires digging in to the geometry, and entering
 somewhat lengthy expressions for many of the scattering paths.

 A related method is to in effect use a first-order approximation of those
 changes. To do that, create two atoms files with slightly different values
 of c. Generate the corresponding paths, and see how the reff of those paths
 changes. For example, changing c by 0.01 might result in a certain path
 having a reff change by 0.014. Use the ratio of the change in reff to the
 change in c to scale the delr of those paths with respect to a guessed
 parameter delc. In the example I just provided the delr of the path in
 question would be chosen to be 1.4*delc.

 The second method is, of course, approximate, but for small changes in a
 parameter such as c can work pretty well, and can be easier to implement
 than the first.

 --Scott Calvin
 Sarah Lawrence College


 On May 29, 2014, at 12:33 PM, Carl Brozek bro...@mit.edu wrote:

  Dear All,
 
  Thank you for your responses so far and I apologize for not being
 clearer.
 
  Here is the problem at hand: I have a material that is best thought of
 as organic, graphene-like 2-D sheets connected by infinite chains of Fe-S.
 Based on PXRD and other techniques, we know the structure of the AB plane
 (the 2-D organic part), but we aren't able to make sense of what is going
 on with the Fe-S chain. We can simulate the PXRD based on proposed .cif
 files, but it's off most likely because of the c direction (Fe-S chain).
 
  We collected Fe K edge XAS to tease out Fe-S bond angles and distances,
 hoping we could feed this into our simulation for the PXRD to improve the
 fit.
 
  Modifying the ATOMS input by hand, by constructing different reasonable
 geometries, was improving the simulation, but using a error minimization
 fitting program would be best.
 
  So, is it possible to vary specific angles and distances between atoms
 along the c-direction only in an error minimization program based on our
 experimental data?
 
  I apologize if you have already responded to this reformulated question.
 
  best,
  Carl


 ___
 Ifeffit mailing list
 Ifeffit@millenia.cars.aps.anl.gov
 http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit




-- 
PhD Candidate | Chemistry | MIT
SB | 2010 | University of Chicago
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


[Ifeffit] Fitting EXAFS simulation to experimental

2014-05-28 Thread Carl Brozek
Dear listhost,

I'm using Artemis as a front end for ATOMS and FEFF and I would like to
build a simulated EXAFS spectrum based on experimental data I have. I know
how to generate a simulation based on a .cif or .xyz file, but is it
possible to vary parameters in these input geometries to best match the
experimental?

Has someone implemented this in artemis or matlab?

thanks,
Carl

-- 
PhD Candidate | Chemistry | MIT
SB | 2010 | University of Chicago
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit