[DFTB-Plus-User] a bug in dptools-0.1

Bálint Aradi balint.aradi at bccms.uni-bremen.de
Fri Sep 23 10:22:01 CEST 2011


Dear Ivan,

> To developers of the DPTools:
> 
> there is a bug in xyz.py (lines 54-55) causing the numeration of
> elements starts from 0 rather than from 1, when doing conversion of
> coordinates from xyz to gen format with xyz2gen. To fix it, the
> subtraction of 1 must be removed, i.e.,
> 
> as is:
>                 speciedict[species] = len(specienames) - 1
>                 indexes[ii] = len(specienames) - 1
> fix:
>                 speciedict[species] = len(specienames)
>                 indexes[ii] = len(specienames)
> 
> 

 Thanks for spotting the bug! The numbering in xyz.py is fine, as inside
dptools the elements should carry indices in the Python sense (starting
from 0). The bug was in the tofile() method of the Gen object, which did
not add 1 to the indices, when writing them out.

 I fixed the issue, dptools-0.1p1 is now online with the fix.

 Best regards,

  Bálint

-- 
Dr. Bálint Aradi
Bremen Center for Computational Materials Science, University of Bremen
http://www.bccms.uni-bremen.de/cms/people/b_aradi/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://www.dftb-plus.info/pipermail/dftb-plus-user/attachments/20110923/2a49db11/attachment.pgp>


More information about the DFTB-Plus-User mailing list