Révision 9 src/ReadInput_siesta.f90

ReadInput_siesta.f90 (revision 9)
179 179
           Idx=Index(Line," ")
180 180
           Line2=Trim(AdjustL(Line(Idx+1:)))
181 181
           Read(Line2,*) Siesta_NbSpecies
182
           ALLOCATE(ListSpecies(Siesta_NbSpecies))
182
           ALLOCATE(Siesta_SpeciesMass(Siesta_NbSpecies))
183 183
           ALLOCATE(Siesta_SpeciesName(Siesta_NbSpecies))
184 184
        END IF
185 185

  
......
206 206
              Read(Line,*) ITmp
207 207
              Idx=Index(Line,' ')
208 208
              Line=AdjustL(Line(Idx+1:))
209
              Read(Line,*) Ztmp
210
              ListSpecies(ITmp)=ZTmp
209
              Read(Line,*) Idx
210
              Siesta_SpeciesMass(ITmp)=Idx
211 211
              Idx=Index(Line,' ')
212 212
              Line=AdjustL(Line(Idx+1:))
213 213
              Idx=Index(Line,' ')
......
239 239
                         TRIM(Siesta_SpeciesName(IdxSpecies(I)))
240 240
                    Call Die('Readinput_siesta:Reading AtomicCoordinatesAndAtomicSpecies',Line,Unit=IOOUT)
241 241
                 END IF
242
! We look for the Mass number also
243
                 IF (Atome(I)/=Siesta_SpeciesMass(IdxSpecies(I))) THEN
244
                    Write(Line,'(A,I5,1X,I5,1X,I5)') 'AtMass /= SpeciesMass for atom ',I,Atome(I), &
245
                         Siesta_SpeciesMass(IdxSpecies(I))
246
                    Call Die('ReadInput_siesta:Reading AtomicCoordinatesAndAtomicSpecies',Line,Unit=IOOUT)
247
                 END IF
242 248
              ELSE
243 249
                 AtName(I)=AdjustL(Trim(Siesta_SpeciesName(IdxSpecies(I))))
250
                 Atome(I)=Siesta_SpeciesMass(IdxSpecies(I))
244 251
              END IF
245 252
! we look for something else at the end of the line
246 253
! We save everything but the x,y,z, and species description              

Formats disponibles : Unified diff