Re: [Ifeffit] problem Generating feffNNNN.dat with Larch in python

2024-07-12 Thread Anis Attiaoui
Thank you so much, Kaifeng. Your suggestions fixed the problem!

Best regards,
A.

From: Ifeffit  On Behalf Of Kaifeng 
Zheng
Sent: Friday, July 12, 2024 9:19 AM
To: XAFS Analysis using Ifeffit 
Subject: Re: [Ifeffit] problem Generating feff.dat with Larch in python

Dear Dr. Anis, If you want to print feff. dat files, you may need to modify 
the print level in your PRINT card. Please try the following card. The 6th 
number in the PRINT card needs to be 3. Best, Kaifeng Zheng, Stony Brook 
UniversityStony
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Dear Dr. Anis,
If you want to print feff.dat files, you may need to modify the print level 
in your PRINT card. Please try the following card. The 6th number in the PRINT 
card needs to be 3.
[cid:[email protected]]
Best,
Kaifeng Zheng,
Stony Brook University
Stony Brook, NY 11794

Department of Materials Science and Chemical Engineering
Tele: +1(213)512-8539
Email: [email protected]<mailto:[email protected]>

Structure and Dynamics of Applied Nanomaterials Group
Chemistry Division
Brookhaven National Laboratory
Email: [email protected]<mailto:[email protected]>



On Fri, Jul 12, 2024 at 11:59 AM Anis Attiaoui 
mailto:[email protected]>> wrote:
Dear All, I am trying to generate the path files of a DFT structure using larch 
in python. I will briefly describe the methodology I am following in hope it 
might help shed some light to the problem I am facing. I start from a .cif file 
of
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd
Dear All,

I am trying to generate the path files of a DFT structure using larch in 
python. I will briefly describe the methodology I am following in hope it might 
help shed some
light to the problem I am facing.

I start from a .cif file of the relaxed  DFT structure of 64-atoms GeSn. Then, 
I try to evaluate all the possible .inp file of the corresponding absorbing 
atoms (Sn and Ge). I am attaching the .inp file of one site0 for Sn ( tested it 
through Artemis and it works fine). Then I try to call the FeffRunner module to 
extract the corresponding feff.dat path files that will be used to build 
the EXAFS spectra.
It is in this step that I am facing an issue. It seems that FeffRunner is 
working but it doesn’t generate the corresponding feff.dat path files. (I 
am attaching an image of what is produced when I run the FeffRunner module).

Below is the python script I used to generate the .inp file as well as the 
paths via Larch.
“
from larch.xafs import FeffRunner
from larch.xrd.struct2xas import Struct2XAS

# read .cif DFT data with ase
DFT_path = '/home/ml-dell/Documents/Simulation/exafs/DFT/'
cif_file = f'{DFT_path}CIF-00010-T300K.xyz'
mat_obj = Struct2XAS(file = cif_file, abs_atom="Ge")

for site in range(mat_obj.nabs_sites):
mat_obj.set_abs_site(site)

#to get information on the coordination environment around absorber atom
mat_obj.get_coord_envs_info()
mat_obj.get_coord_envs()

# use feff to generate .inp
mytemplate = None
mypath = DFT_path
mat_obj.make_input_feff(radius=9.0, template=mytemplate, parent_path=mypath)

# now we can run feff to generate the paths via larch
feff_inp = f"{mat_obj.outdir}/feff.inp"
session = Interpreter()
sim = FeffRunner(feff_inp,_larch=session)
sim.run()

”

I will be thankful for any suggestions on how to fix this issue.

Best regards,
Dr. Anis Attiaoui,

Stanford University, GLAM
Dept. Material Science and Engineering,
McCullough Building,
476 Lomita Mall, Stanford
California, USA, 94305
Office/shipping: McC-203
Tel: +1(650)485-0501
Web: 
https://urldefense.us/v3/__https://mcintyre.stanford.edu__;!!G_uCfscf7eWS!eWBL_rKofu6EW9mOYJF41xOWpmKoBd3lA2N01PBiLVqvdgTgE1jwB9mAlK7zfROfzTwNYvtSGO2hK7hAYtAjNKTm24jWpPE$
 
<https://urldefense.us/v3/__https:/mcintyre.stanford.edu/__;!!G_uCfscf7eWS!ctJ0zkFWwNTPEk_U5zx5-qfJjm6WqCH7qtEznlj8S2bokHYuqm_yn6Pb0sjuqt4Uu6thKR-GDWDAKlrxtN1OJav3q5rQYe0$>



___
Ifeffit mailing list
[email protected]<mailto:[email protected]>
https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit__;!!G_uCfscf7eWS!eWBL_rKofu6EW9mOYJF41xOWpmKoBd3lA2N01PBiLVqvdgTgE1jwB9mAlK7zfROfzTwNYvtSGO2hK7hAYtAjNKTmREXOp24$
 
<https://urldefense.us/v3/__http:/millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit__;!!G_uCfscf7eWS!ZVgulPXWZhwL3i4SjGXL7h__rqqmZ1AV_0e-Nu-hK7ESOw_u3RICr8n46KeOMWG7xrfV4uyA4e8sj-wji2iofIesF3yhv1490ecSihKrm9s$>
Unsubscribe: 
https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/options/ifeffit__;!!G_uCfscf7eWS!eWBL_rKofu6EW9mOYJF41xOWpmKoBd3lA2N01PBiLVqvdgTgE1jwB9mAlK7zfROfzTwNYvtSGO2hK7hAYtAjNKTmHt

Re: [Ifeffit] problem Generating feffNNNN.dat with Larch in python

2024-07-12 Thread Anis Attiaoui
Thank you Matt for the suggestion, you and Kaifeng were correct. Adjusting the 
PRINT statement seemed to make it work, and I now have access to the 
feff.dat files.

Best regards,
A.

From: Ifeffit  On Behalf Of Matt 
Newville
Sent: Friday, July 12, 2024 10:36 AM
To: XAFS Analysis using Ifeffit 
Subject: Re: [Ifeffit] problem Generating feff.dat with Larch in python

Hi Anis, Sorry for the trouble. I'm not certain what you are seeing. Can you 
attach one of the feff. inp files generated? You did attach a Feff input file, 
but that says it was generated by Atoms. As Kaifeng suggests, the default 
version
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Hi Anis,

Sorry for the trouble.  I'm not certain what you are seeing.   Can you attach 
one of the feff.inp files generated?   You did attach a Feff input file, but 
that says it was generated by Atoms.  As Kaifeng suggests, the default version 
of feff run by FeffRunner (Feff 8) needs 6 values for the CONTROL and PRINT 
statements, not 4.   But that is what should be produced when creating the 
Feff.inp files.

Since you are using CIFs as input, have you tried using the cif2feff function?  
That might work here.



On Fri, Jul 12, 2024 at 10:59 AM Anis Attiaoui 
mailto:[email protected]>> wrote:
Dear All, I am trying to generate the path files of a DFT structure using larch 
in python. I will briefly describe the methodology I am following in hope it 
might help shed some light to the problem I am facing. I start from a .cif file 
of
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd
Dear All,

I am trying to generate the path files of a DFT structure using larch in 
python. I will briefly describe the methodology I am following in hope it might 
help shed some
light to the problem I am facing.

I start from a .cif file of the relaxed  DFT structure of 64-atoms GeSn. Then, 
I try to evaluate all the possible .inp file of the corresponding absorbing 
atoms (Sn and Ge). I am attaching the .inp file of one site0 for Sn ( tested it 
through Artemis and it works fine). Then I try to call the FeffRunner module to 
extract the corresponding feff.dat path files that will be used to build 
the EXAFS spectra.
It is in this step that I am facing an issue. It seems that FeffRunner is 
working but it doesn’t generate the corresponding feff.dat path files. (I 
am attaching an image of what is produced when I run the FeffRunner module).

Below is the python script I used to generate the .inp file as well as the 
paths via Larch.
“
from larch.xafs import FeffRunner
from larch.xrd.struct2xas import Struct2XAS

# read .cif DFT data with ase
DFT_path = '/home/ml-dell/Documents/Simulation/exafs/DFT/'
cif_file = f'{DFT_path}CIF-00010-T300K.xyz'
mat_obj = Struct2XAS(file = cif_file, abs_atom="Ge")

for site in range(mat_obj.nabs_sites):
mat_obj.set_abs_site(site)

#to get information on the coordination environment around absorber atom
mat_obj.get_coord_envs_info()
mat_obj.get_coord_envs()

# use feff to generate .inp
mytemplate = None
mypath = DFT_path
mat_obj.make_input_feff(radius=9.0, template=mytemplate, parent_path=mypath)

# now we can run feff to generate the paths via larch
feff_inp = f"{mat_obj.outdir}/feff.inp"
session = Interpreter()
sim = FeffRunner(feff_inp,_larch=session)
sim.run()

”

I will be thankful for any suggestions on how to fix this issue.

Best regards,
Dr. Anis Attiaoui,

Stanford University, GLAM
Dept. Material Science and Engineering,
McCullough Building,
476 Lomita Mall, Stanford
California, USA, 94305
Office/shipping: McC-203
Tel: +1(650)485-0501
Web: 
https://urldefense.us/v3/__https://mcintyre.stanford.edu__;!!G_uCfscf7eWS!dRUbZqAw-wS4XZKTLCkoxxPPkboX_DvkLvpVgszbK81APHqf4aVY25v6VWYmP0Sb76_HMno-qllhSsOtEBl0oMkK3Q37VVk$
 
<https://urldefense.us/v3/__https:/mcintyre.stanford.edu/__;!!G_uCfscf7eWS!ctJ0zkFWwNTPEk_U5zx5-qfJjm6WqCH7qtEznlj8S2bokHYuqm_yn6Pb0sjuqt4Uu6thKR-GDWDAKlrxtN1OJav3q5rQYe0$>



___
Ifeffit mailing list
[email protected]<mailto:[email protected]>
https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit__;!!G_uCfscf7eWS!dRUbZqAw-wS4XZKTLCkoxxPPkboX_DvkLvpVgszbK81APHqf4aVY25v6VWYmP0Sb76_HMno-qllhSsOtEBl0oMkKhs_Pp0Y$
 
<https://urldefense.us/v3/__http:/millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit__;!!G_uCfscf7eWS!Zbbcs215H_LCe0axgZZuyGNwt-QUU9UTC-vWm8vVBeihdGxqbDcIntuJFOHQBMhqvbqEX5HW2NkiorbQLRtQlCbLt_dSfLceaBiYGVk$>
Unsubscribe: 
https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/options/ifeffit__;!!G_uCfscf7eWS!dRUbZqAw-wS4XZKTLCkoxxPPkboX_DvkLvpVgszbK81APHqf4aVY25v6V

Re: [Ifeffit] problem Generating feffNNNN.dat with Larch in python

2024-07-12 Thread Matt Newville
Hi Anis,

Sorry for the trouble.  I'm not certain what you are seeing.   Can you
attach one of the feff.inp files generated?   You did attach a Feff input
file, but that says it was generated by Atoms.  As Kaifeng suggests, the
default version of feff run by FeffRunner (Feff 8) needs 6 values for the
CONTROL and PRINT statements, not 4.   But that is what should be produced
when creating the Feff.inp files.

Since you are using CIFs as input, have you tried using the
cif2feff function?  That might work here.



On Fri, Jul 12, 2024 at 10:59 AM Anis Attiaoui  wrote:

> Dear All, I am trying to generate the path files of a DFT structure using
> larch in python. I will briefly describe the methodology I am following in
> hope it might help shed some light to the problem I am facing. I start from
> a .cif file of
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>
> ZjQcmQRYFpfptBannerEnd
>
> Dear All,
>
>
>
> I am trying to generate the path files of a DFT structure using larch in
> python. I will briefly describe the methodology I am following in hope it
> might help shed some
>
> light to the problem I am facing.
>
> I start from a .cif file of the relaxed  DFT structure of 64-atoms GeSn.
> Then, I try to evaluate all the possible .inp file of the corresponding
> absorbing atoms (Sn and Ge). I am attaching the .inp file of one site0 for
> Sn ( tested it through Artemis and it works fine). Then I try to call the
> FeffRunner module to extract the corresponding feff.dat path files that
> will be used to build the EXAFS spectra.
>
> It is in this step that I am facing an issue. It seems that FeffRunner is
> working but it doesn’t generate the corresponding feff.dat path files.
> (I am attaching an image of what is produced when I run the FeffRunner
> module).
>
>
> Below is the python script I used to generate the .inp file as well as the
> paths via Larch.
>
> “
>
> from larch.xafs import FeffRunner
>
> from larch.xrd.struct2xas import Struct2XAS
>
>
>
> # read .cif DFT data with ase
>
> DFT_path = '/home/ml-dell/Documents/Simulation/exafs/DFT/'
>
> cif_file = f'{DFT_path}CIF-00010-T300K.xyz'
>
> mat_obj = Struct2XAS(file = cif_file, abs_atom="Ge")
>
>
>
> for site in range(mat_obj.nabs_sites):
>
> mat_obj.set_abs_site(site)
>
>
>
> #to get information on the coordination environment around absorber
> atom
>
> mat_obj.get_coord_envs_info()
>
> mat_obj.get_coord_envs()
>
>
>
> # use feff to generate .inp
>
> mytemplate = None
>
> mypath = DFT_path
>
> mat_obj.make_input_feff(radius=9.0, template=mytemplate,
> parent_path=mypath)
>
>
>
> # now we can run feff to generate the paths via larch
>
> feff_inp = f"{mat_obj.outdir}/feff.inp"
>
> session = Interpreter()
>
> sim = FeffRunner(feff_inp,_larch=session)
>
> sim.run()
>
>
>
> ”
>
>
>
> I will be thankful for any suggestions on how to fix this issue.
>
>
>
> Best regards,
>
> Dr. Anis Attiaoui,
>
>
>
> *Stanford University, GLAM*
>
> Dept. Material Science and Engineering,
>
> McCullough Building,
>
> 476 Lomita Mall, Stanford
>
> California, USA, 94305
>
> Office/shipping: McC-203
>
> Tel: *+1(6**50)485-0501*
>
> Web: 
> https://urldefense.us/v3/__https://mcintyre.stanford.edu__;!!G_uCfscf7eWS!Zbbcs215H_LCe0axgZZuyGNwt-QUU9UTC-vWm8vVBeihdGxqbDcIntuJFOHQBMhqvbqEX5HW2NkiorbQLRtQlCbLt_dSfLceR_P6cd0$
>  
> 
>
>
>
>
>
>
> ___
> Ifeffit mailing list
> [email protected]
> https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit__;!!G_uCfscf7eWS!Zbbcs215H_LCe0axgZZuyGNwt-QUU9UTC-vWm8vVBeihdGxqbDcIntuJFOHQBMhqvbqEX5HW2NkiorbQLRtQlCbLt_dSfLceaBiYGVk$
>  
> Unsubscribe: 
> https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/options/ifeffit__;!!G_uCfscf7eWS!Zbbcs215H_LCe0axgZZuyGNwt-QUU9UTC-vWm8vVBeihdGxqbDcIntuJFOHQBMhqvbqEX5HW2NkiorbQLRtQlCbLt_dSfLcestwNdzY$
>  
>


-- 
--Matt Newville  630-327-7411
___
Ifeffit mailing list
[email protected]
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] problem Generating feffNNNN.dat with Larch in python

2024-07-12 Thread Kaifeng Zheng
Dear Dr. Anis,
If you want to print feff.dat files, you may need to modify the print
level in your PRINT card. Please try the following card. The 6th number in
the PRINT card needs to be 3.
[image: image.png]
Best,
Kaifeng Zheng,
Stony Brook University
Stony Brook, NY 11794

Department of Materials Science and Chemical Engineering
Tele: +1(213)512-8539
Email: [email protected]

Structure and Dynamics of Applied Nanomaterials Group
Chemistry Division
Brookhaven National Laboratory
Email: [email protected]



On Fri, Jul 12, 2024 at 11:59 AM Anis Attiaoui  wrote:

> Dear All, I am trying to generate the path files of a DFT structure using
> larch in python. I will briefly describe the methodology I am following in
> hope it might help shed some light to the problem I am facing. I start from
> a .cif file of
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>
> ZjQcmQRYFpfptBannerEnd
>
> Dear All,
>
>
>
> I am trying to generate the path files of a DFT structure using larch in
> python. I will briefly describe the methodology I am following in hope it
> might help shed some
>
> light to the problem I am facing.
>
> I start from a .cif file of the relaxed  DFT structure of 64-atoms GeSn.
> Then, I try to evaluate all the possible .inp file of the corresponding
> absorbing atoms (Sn and Ge). I am attaching the .inp file of one site0 for
> Sn ( tested it through Artemis and it works fine). Then I try to call the
> FeffRunner module to extract the corresponding feff.dat path files that
> will be used to build the EXAFS spectra.
>
> It is in this step that I am facing an issue. It seems that FeffRunner is
> working but it doesn’t generate the corresponding feff.dat path files.
> (I am attaching an image of what is produced when I run the FeffRunner
> module).
>
>
> Below is the python script I used to generate the .inp file as well as the
> paths via Larch.
>
> “
>
> from larch.xafs import FeffRunner
>
> from larch.xrd.struct2xas import Struct2XAS
>
>
>
> # read .cif DFT data with ase
>
> DFT_path = '/home/ml-dell/Documents/Simulation/exafs/DFT/'
>
> cif_file = f'{DFT_path}CIF-00010-T300K.xyz'
>
> mat_obj = Struct2XAS(file = cif_file, abs_atom="Ge")
>
>
>
> for site in range(mat_obj.nabs_sites):
>
> mat_obj.set_abs_site(site)
>
>
>
> #to get information on the coordination environment around absorber
> atom
>
> mat_obj.get_coord_envs_info()
>
> mat_obj.get_coord_envs()
>
>
>
> # use feff to generate .inp
>
> mytemplate = None
>
> mypath = DFT_path
>
> mat_obj.make_input_feff(radius=9.0, template=mytemplate,
> parent_path=mypath)
>
>
>
> # now we can run feff to generate the paths via larch
>
> feff_inp = f"{mat_obj.outdir}/feff.inp"
>
> session = Interpreter()
>
> sim = FeffRunner(feff_inp,_larch=session)
>
> sim.run()
>
>
>
> ”
>
>
>
> I will be thankful for any suggestions on how to fix this issue.
>
>
>
> Best regards,
>
> Dr. Anis Attiaoui,
>
>
>
> *Stanford University, GLAM*
>
> Dept. Material Science and Engineering,
>
> McCullough Building,
>
> 476 Lomita Mall, Stanford
>
> California, USA, 94305
>
> Office/shipping: McC-203
>
> Tel: *+1(6**50)485-0501*
>
> Web: 
> https://urldefense.us/v3/__https://mcintyre.stanford.edu__;!!G_uCfscf7eWS!ZVgulPXWZhwL3i4SjGXL7h__rqqmZ1AV_0e-Nu-hK7ESOw_u3RICr8n46KeOMWG7xrfV4uyA4e8sj-wji2iofIesF3yhv1490ecSFFxn0nk$
>  
> 
>
>
>
>
>
>
> ___
> Ifeffit mailing list
> [email protected]
> https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit__;!!G_uCfscf7eWS!ZVgulPXWZhwL3i4SjGXL7h__rqqmZ1AV_0e-Nu-hK7ESOw_u3RICr8n46KeOMWG7xrfV4uyA4e8sj-wji2iofIesF3yhv1490ecSihKrm9s$
>  
> Unsubscribe: 
> https://urldefense.us/v3/__http://millenia.cars.aps.anl.gov/mailman/options/ifeffit__;!!G_uCfscf7eWS!ZVgulPXWZhwL3i4SjGXL7h__rqqmZ1AV_0e-Nu-hK7ESOw_u3RICr8n46KeOMWG7xrfV4uyA4e8sj-wji2iofIesF3yhv1490ecS918xe8Q$
>  
>
___
Ifeffit mailing list
[email protected]
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit