1212# See LICENSE_DANSE.txt for license information.
1313#
1414##############################################################################
15-
16- """
17- Provide class Atom for managing properties of an atom in structure model.
18- """
15+ """Provide class Atom for managing properties of an atom in structure model."""
1916
2017import numpy
2118
@@ -170,7 +167,9 @@ def msdLat(self, vl):
170167 lat = self .lattice or cartesian_lattice
171168 vln = numpy .array (vl , dtype = float ) / lat .norm (vl )
172169 G = lat .metrics
173- rhs = numpy .array ([G [0 ] * lat .ar , G [1 ] * lat .br , G [2 ] * lat .cr ], dtype = float )
170+ rhs = numpy .array (
171+ [G [0 ] * lat .ar , G [1 ] * lat .br , G [2 ] * lat .cr ], dtype = float
172+ )
174173 rhs = numpy .dot (rhs , vln )
175174 msd = numpy .dot (rhs , numpy .dot (self .U , rhs ))
176175 return msd
@@ -202,7 +201,13 @@ def msdCart(self, vc):
202201 def __repr__ (self ):
203202 """String representation of this Atom."""
204203 xyz = self .xyz
205- s = "%-4s %8.6f %8.6f %8.6f %6.4f" % (self .element , xyz [0 ], xyz [1 ], xyz [2 ], self .occupancy )
204+ s = "%-4s %8.6f %8.6f %8.6f %6.4f" % (
205+ self .element ,
206+ xyz [0 ],
207+ xyz [1 ],
208+ xyz [2 ],
209+ self .occupancy ,
210+ )
206211 return s
207212
208213 def __copy__ (self , target = None ):
@@ -354,13 +359,19 @@ def _set_Uij(self, i, j, value):
354359 """
355360
356361 U11 = property (
357- lambda self : self ._get_Uij (0 , 0 ), lambda self , value : self ._set_Uij (0 , 0 , value ), doc = _doc_uii .format (0 )
362+ lambda self : self ._get_Uij (0 , 0 ),
363+ lambda self , value : self ._set_Uij (0 , 0 , value ),
364+ doc = _doc_uii .format (0 ),
358365 )
359366 U22 = property (
360- lambda self : self ._get_Uij (1 , 1 ), lambda self , value : self ._set_Uij (1 , 1 , value ), doc = _doc_uii .format (1 )
367+ lambda self : self ._get_Uij (1 , 1 ),
368+ lambda self , value : self ._set_Uij (1 , 1 , value ),
369+ doc = _doc_uii .format (1 ),
361370 )
362371 U33 = property (
363- lambda self : self ._get_Uij (2 , 2 ), lambda self , value : self ._set_Uij (2 , 2 , value ), doc = _doc_uii .format (2 )
372+ lambda self : self ._get_Uij (2 , 2 ),
373+ lambda self , value : self ._set_Uij (2 , 2 , value ),
374+ doc = _doc_uii .format (2 ),
364375 )
365376
366377 _doc_uij = """
@@ -371,13 +382,19 @@ def _set_Uij(self, i, j, value):
371382 """
372383
373384 U12 = property (
374- lambda self : self ._get_Uij (0 , 1 ), lambda self , value : self ._set_Uij (0 , 1 , value ), doc = _doc_uij .format (0 , 1 )
385+ lambda self : self ._get_Uij (0 , 1 ),
386+ lambda self , value : self ._set_Uij (0 , 1 , value ),
387+ doc = _doc_uij .format (0 , 1 ),
375388 )
376389 U13 = property (
377- lambda self : self ._get_Uij (0 , 2 ), lambda self , value : self ._set_Uij (0 , 2 , value ), doc = _doc_uij .format (0 , 2 )
390+ lambda self : self ._get_Uij (0 , 2 ),
391+ lambda self , value : self ._set_Uij (0 , 2 , value ),
392+ doc = _doc_uij .format (0 , 2 ),
378393 )
379394 U23 = property (
380- lambda self : self ._get_Uij (1 , 2 ), lambda self , value : self ._set_Uij (1 , 2 , value ), doc = _doc_uij .format (1 , 2 )
395+ lambda self : self ._get_Uij (1 , 2 ),
396+ lambda self , value : self ._set_Uij (1 , 2 , value ),
397+ doc = _doc_uij .format (1 , 2 ),
381398 )
382399
383400 # clean local variables
@@ -481,7 +498,8 @@ def Uisoequiv(self, value):
481498
482499 @property
483500 def Bisoequiv (self ):
484- """float : The Debye-Waller isotropic displacement or an equivalent value.
501+ """float : The Debye-Waller isotropic displacement or an equivalent
502+ value.
485503
486504 This equals ``8 * pi**2 * Uisoequiv``. Setting a new value
487505 rescales `U` tensor to yield equivalent direction-average of
0 commit comments