[CP2K:2686] Re: a bug in the "cls_assign_core_states" subroutine in xas_methods.F
Hou Zhufeng
vale... at gmail.com
Sun Apr 25 12:27:56 UTC 2010
Hi, Marci,
Just now I try the new cvs version (i.e., 2.1.231), this version works
well. Thanks for your improvement.
Best regards
zh
On Sun, Apr 25, 2010 at 8:03 PM, Hou Zhufeng <vale... at gmail.com> wrote:
> Hi, Marci,
>
> Thanks for your reply. I will try it.
>
> In the "SUBROUTINE xas" of the xas_methods.F, I found that a similar
> problem should be fixed. See the followings:
>
> 415 DO iat = 1,nexc_atoms
> 416 iatom = xas_env%exc_atoms(iat)
> 417 ! determine which state has to be excited in the global list
> 418 state_to_be_excited = state_of_atom(iat)
>
> The lines 415 and 416 needs to be replaced with
> DO iat = 1,xas_control%nexc_atoms
> iatom = xas_control%exc_atoms(iat)
>
> Best regards
>
> Zh
>
>
>
> On Sat, Apr 24, 2010 at 8:38 PM, marci <marc... at pci.uzh.ch> wrote:
>
>> Hi zh
>>
>> there was indeed a bug, but it was only a sort of typo in
>> xas_env_type.
>> Anyway, it should be fixed now. Just try your input with the
>> new cvs version, and report any other possible problem.
>> Thanks for pointing this out.
>> marcella
>>
>> On Apr 24, 10:43 am, zh <vale... at gmail.com> wrote:
>> > Dear CPK developers,
>> >
>> > For the latest version of cp2k (e.g., 2.1.223), if the value specified
>> > for "STATE_SEARCH" in the XAS calculations is larger than 2, it will
>> > lead to an error message as fellows:
>> >
>> > LOCALIZE| The spread relative to a set of orbitals is computed
>> > LOCALIZE| Orbitals to be localized: Those with index between
>> > 1 and 3
>> > LOCALIZE| Spread defined by the Berry phase operator
>> > LOCALIZE| The optimal unitary transformation is generated by the
>> > Jacobi algorithm
>> >
>> > Localize a sub-set of MOs with spin alpha, to better identify
>> > the core states that have to be excited
>> >
>> > The sub-set contains states from 1 to 3
>> > Spread Functional sum_in -w_i ln(|z_in|^2) sum_in
>> > w_i(1-|z_in|^2)
>> > Initial Spread (Berry) : 1.3768156742
>> > 1.1122317318
>> > Localization by iterative Jacobi rotation
>> > Iteration Tolerance Time
>> > Localization for spin 1 converged in 2
>> > iterations
>> > Spread Functional sum_in -w_i ln(|z_in|^2) sum_in
>> > w_i(1-|z_in|^2)
>> > Total Spread (Berry) : 1.3716326089
>> > 1.1086930159
>> > At line 1699 of file /opt/cp2k-2.1.223/makefiles/../src/xas_methods.F
>> > Traceback: (Innermost first)
>> > ............
>> > Fortran runtime error: Array element out of bounds: 3 in (1:2), dim=1
>> >
>> > By comparing "xas_methods.F" in this new version with the one in the
>> > old version(2.1.81) and testing my following modification, the above
>> > error is caused by that the variables "nexc_search" and "nexc_atoms"
>> > are not assigned before calling them in the subroutine
>> > "cls_assign_core_states".
>> >
>> > In the subroutine "cls_assign_core_states", the following places are
>> > needed to be updated:
>> > 1.
>> > 1664 CALL get_mo_set(mos(1)%mo_set, mo_coeff=mo_coeff,
>> > maxocc=maxocc, nao=nao, homo=homo)
>> > 1665
>> > 1666 CALL get_xas_env(xas_env=xas_env,&
>> >
>> > The following two lines should be added to the line 1665:
>> > nexc_search = xas_control%nexc_search
>> > nexc_atoms = xas_control%nexc_atoms
>> > 2.
>> > 1695 ! Assign the state to the closest atom
>> > 1696 distmin = 100.0_dp
>> > 1697
>> > 1698 DO iat = 1,nexc_atoms
>> >
>> > The line 1698 should be replaced with
>> > DO iat = 1,xas_control%nexc_atoms
>> >
>> > 3.
>> > 1741 ! In the set of states, assign the index of the state to be
>> > excited for iatom
>> > 1742 IF (output_unit>0) THEN
>> > 1743 WRITE (UNIT=output_unit,FMT="(/,T10,A,/)")&
>> > 1744 "List the atoms to be excited and the relative of MOs
>> > index "
>> > 1745 END IF
>> > 1746 DO iat = 1,nexc_atoms
>> > 1747 iatom = xas_env%exc_atoms(iat)
>> >
>> > The lines 1746 and 1747 should be replaced with
>> > DO iat = 1,xas_control%nexc_atoms
>> > iatom = xas_control%exc_atoms(iat)
>> >
>> > Please check them.
>> >
>> > Best regards
>> > zh
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "cp2k" group.
>> > To post to this group, send email to cp... at googlegroups.com.
>> > To unsubscribe from this group, send email to
>> cp2k+uns... at googlegroups.com <cp2k%2Bun... at googlegroups.com>.
>> > For more options, visit this group athttp://
>> groups.google.com/group/cp2k?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "cp2k" group.
>> To post to this group, send email to cp... at googlegroups.com.
>> To unsubscribe from this group, send email to
>> cp2k+uns... at googlegroups.com <cp2k%2Bun... at googlegroups.com>.
>> For more options, visit this group at
>> http://groups.google.com/group/cp2k?hl=en.
>>
>>
>
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To post to this group, send email to cp... at googlegroups.com.
To unsubscribe from this group, send email to cp2k+uns... at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cp2k?hl=en.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20100425/ad04ab52/attachment.htm>
More information about the CP2K-user
mailing list