Commit 7e57ac51 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of fleur-git:fleur into develop

parents 75d1c18a 0beed7ab
......@@ -4,7 +4,7 @@
! ************************************************************
CONTAINS
SUBROUTINE force_w(&
& input,atoms,sym,results,cell,oneD)
& input,atoms,sym,results,cell,oneD,vacuum)
USE m_geo
USE m_relax
USE m_types
......@@ -17,6 +17,7 @@
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_vacuum),INTENT(IN) :: vacuum
! ..
! .. Local Scalars ..
REAL,PARAMETER:: zero=0.0
......@@ -121,7 +122,7 @@
IF ((sum<eps_force).AND.input%l_f) THEN
CALL geo(&
& atoms,sym,cell,&
& oneD,input,results%tote,forcetot)
& oneD,vacuum,input,results%tote,forcetot)
END IF
ENDIF
......
......@@ -7,9 +7,8 @@
MODULE m_geo
USE m_juDFT
CONTAINS
SUBROUTINE geo(&
& atoms,sym,cell,oneD,input_in,tote,&
& forcetot)
SUBROUTINE geo(atoms,sym,cell,oneD,vacuum,input_in,tote,&
forcetot)
! *********************************************************************
! * calculates the NEW atomic positions after the results%force calculation *
......@@ -47,7 +46,8 @@ CONTAINS
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_input),INTENT(IN):: input_in
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_input),INTENT(IN) :: input_in
! ..
! .. Scalar Arguments ..
REAL, INTENT (IN) :: tote
......@@ -112,14 +112,10 @@ CONTAINS
na = 1
DO i = 1,atoms_new%ntype
zat(i)=real(atoms%nz(i))
IF (input%film) atoms_new%taual(3,na) = atoms_new%taual(3,na)/cell%amat(3,3)
tau0_i(:,i) = atoms_new%taual(:,na)
tau0(:,i)=MATMUL(cell%amat,tau0_i(:,i))
tau0(:,i)=atoms%pos(:,na)
na = na + atoms_new%neq(i)
END DO
CALL bfgs0(atoms%ntype, istep0,xold,y,h)
DO itype=1,atoms%ntype
......@@ -171,17 +167,60 @@ CONTAINS
ENDDO
ENDDO
! CALL judft_error("Writing on new input file not implemented in geo")
input%l_f = .false.
! CALL rw_inp('W',atoms_new,obsolete,vacuum,input,stars,sliceplot,banddos,&
! cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,&
! noel,namex,relcor,a1,a2,a3,scale,dtild,name)
IF(input%l_inpXML) THEN
input%l_f = .FALSE.
IF(.NOT.input%l_inpXML) THEN
ALLOCATE(atoms_temp%nz(atoms%ntype))
ALLOCATE(atoms_temp%zatom(atoms%ntype))
ALLOCATE(atoms_temp%jri(atoms%ntype))
ALLOCATE(atoms_temp%dx(atoms%ntype))
ALLOCATE(atoms_temp%lmax(atoms%ntype))
ALLOCATE(atoms_temp%nlo(atoms%ntype))
ALLOCATE(atoms_temp%ncst(atoms%ntype))
ALLOCATE(atoms_temp%lnonsph(atoms%ntype))
ALLOCATE(atoms_temp%nflip(atoms%ntype))
ALLOCATE(atoms_temp%l_geo(atoms%ntype))
ALLOCATE(atoms_temp%lda_u(atoms%ntype))
ALLOCATE(atoms_temp%bmu(atoms%ntype))
ALLOCATE(atoms_temp%relax(3,atoms%ntype))
ALLOCATE(atoms_temp%neq(atoms%ntype))
ALLOCATE(atoms_temp%taual(3,atoms%nat))
ALLOCATE(atoms_temp%pos(3,atoms%nat))
ALLOCATE(atoms_temp%rmt(atoms%ntype))
ALLOCATE(atoms_temp%ncv(atoms%ntype))
ALLOCATE(atoms_temp%ngopr(atoms%nat))
ALLOCATE(atoms_temp%lapw_l(atoms%ntype))
ALLOCATE(atoms_temp%invsat(atoms%nat))
ALLOCATE(noco_temp%soc_opt(atoms%ntype+2),noco_temp%l_relax(atoms%ntype),noco_temp%b_con(2,atoms%ntype))
ALLOCATE(noco_temp%alph(atoms%ntype),noco_temp%beta(atoms%ntype))
ALLOCATE (Jij_temp%alph1(atoms%ntype),Jij_temp%l_magn(atoms%ntype),Jij_temp%M(atoms%ntype))
ALLOCATE (Jij_temp%magtype(atoms%ntype),Jij_temp%nmagtype(atoms%ntype))
ALLOCATE(atoms_temp%llo(atoms%nlod,atoms%ntype))
ALLOCATE(atoms_temp%ulo_der(atoms%nlod,atoms%ntype))
ALLOCATE(atoms_temp%l_dulo(atoms%nlod,atoms%ntype))
ALLOCATE(vacuum_temp%izlay(vacuum%layerd,2))
atoms_temp%ntypd = atoms%ntypd
atoms_temp%ntype = atoms%ntype
ALLOCATE(noel_temp(atoms%ntypd))
ALLOCATE (hybrid_temp%nindx(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (hybrid_temp%select1(4,atoms%ntype),hybrid_temp%lcutm1(atoms%ntype))
ALLOCATE (hybrid_temp%select2(4,atoms%ntype),hybrid_temp%lcutm2(atoms%ntype),hybrid_temp%lcutwf(atoms%ntype))
CALL rw_inp('r',atoms_temp,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
banddos_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,oneD_temp,hybrid_temp,&
kpts_temp,noel_temp,namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,scale_temp,dtild_temp,&
input_temp%comment)
ELSE
ALLOCATE(noel_temp(1),atomTypeSpecies(1),speciesRepAtomType(1))
ALLOCATE(xmlElectronStates(1,1),xmlPrintCoreStates(1,1))
ALLOCATE(xmlCoreOccs(1,1,1))
CALL r_inpXML(&
atoms_temp,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
CALL r_inpXML(atoms_temp,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
banddos_temp,dimension_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,&
oneD_temp,hybrid_temp,kpts_temp,enpara_temp,sphhar_temp,l_opti_temp,noel_temp,&
namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,scale_temp,dtild_temp,xmlElectronStates,&
......@@ -189,17 +228,29 @@ CONTAINS
numSpecies = SIZE(speciesRepAtomType)
filename = 'inp_new.xml'
input_temp%l_f = input%l_f
input_temp%gw_neigd = dimension_temp%neigd
div(:) = MIN(kpts_temp%nmop(:),1)
CALL w_inpXML(&
atoms_new,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
stars_temp%gmax = stars_temp%gmaxInit
CALL w_inpXML(atoms_new,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
banddos_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,jij_temp,oneD_temp,hybrid_temp,&
kpts_temp,kpts_temp%nmop,kpts_temp%l_gamma,noel_temp,namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,&
scale_temp,dtild_temp,input_temp%comment,xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
atomTypeSpecies,speciesRepAtomType,.FALSE.,filename,numSpecies,enpara_temp)
DEALLOCATE(noel_temp,atomTypeSpecies,speciesRepAtomType)
DEALLOCATE(atomTypeSpecies,speciesRepAtomType)
DEALLOCATE(xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs)
END IF
ENDIF
input_temp%l_f = input%l_f
input_temp%tkb = input%tkb
input_temp%delgau = input%tkb
cell_temp = cell
sym_temp = sym
vacuum_temp = vacuum
CALL rw_inp('W',atoms_new,obsolete_temp,vacuum_temp,input_temp,stars_temp,sliceplot_temp,&
banddos_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,oneD_temp,hybrid_temp,&
kpts_temp,noel_temp,namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,scale_temp,a3_temp(3),&
input_temp%comment)
END IF
RETURN
END SUBROUTINE geo
......
......@@ -327,6 +327,7 @@
!max-length of star
REAL :: gmax
REAL :: gmaxInit
!no of 3d-stars
!INTEGER :: nq3
INTEGER :: ng3
......
......@@ -326,6 +326,7 @@ SUBROUTINE r_inpXML(&
IF(numberNodes.EQ.1) THEN
xcpot%gmaxxc = evaluateFirstOnly(xmlGetAttributeValue(xPathA))
END IF
stars%gmaxInit = stars%gmax
xPathA = '/fleurInput/calculationSetup/cutoffs/@numbands'
numberNodes = xmlGetNumberOfNodes(xPathA)
......
......@@ -6,6 +6,7 @@
<xsd:complexType name="FleurOutputType">
<xsd:all>
<xsd:element maxOccurs="1" minOccurs="0" name="programVersion" type="ProgramVersionType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="parallelizationParameters" type="ParallelizationParametersType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="startDateAndTime" type="DateAndTimeType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="inputData" type="InputDataType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="scfLoop" type="OutSCFLoopType"/>
......@@ -19,6 +20,7 @@
<xsd:element maxOccurs="1" minOccurs="0" name="targetComputerArchitectures" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="precision" type="PrecisionType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="targetStructureClass" type="TargetStructureClassType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="additionalCompilerFlags" type="AdditionalCompilerFlagsType"/>
</xsd:all>
<xsd:attribute name="version" type="xsd:string" use="required"/>
</xsd:complexType>
......@@ -31,6 +33,14 @@
<xsd:list itemType="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="AdditionalCompilerFlagType">
<xsd:list itemType="xsd:string"/>
</xsd:simpleType>
<xsd:complexType name="ParallelizationParametersType">
<xsd:attribute name="mpiPEs" type="xsd:integer" use="required"/>
</xsd:complexType>
<xsd:complexType name="DateAndTimeType">
<xsd:attribute name="date" type="xsd:string" use="required"/>
<xsd:attribute name="time" type="xsd:string" use="required"/>
......@@ -54,6 +64,7 @@
<xsd:element maxOccurs="unbounded" minOccurs="0" name="coreStates" type="OutCoreStatesType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="allElectronCharges" type="ChargeDensityType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="magneticMomentsInMTSpheres" type="MTMagneticMomentsType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="orbitalMagneticMomentsInMTSpheres" type="MTOrbMagneticMomentsType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="totalForcesOnRepresentativeAtoms" type="OutTotalForcesType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="totalEnergy" type="TotalEnergyType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="densityConvergence" type="DensityConvergenceType"/>
......@@ -174,6 +185,13 @@
<xsd:attribute name="units" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="MTOrbMagneticMomentsType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element maxOccurs="unbounded" minOccurs="0" name="orbMagMoment" type="MagneticMomentType"/>
</xsd:sequence>
<xsd:attribute name="units" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="MagneticMomentType">
<xsd:attribute name="atomType" type="xsd:integer" use="required"/>
<xsd:attribute name="moment" type="xsd:double" use="required"/>
......
......@@ -221,7 +221,7 @@ CONTAINS
WRITE (16,FMT=8061) results%tote
END IF
CALL force_w(input,atoms,sym,results,cell,oneD)
CALL force_w(input,atoms,sym,results,cell,oneD,vacuum)
!
! ---> calculate the free energy and the ground state energy,
! extrapolated for T->0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment