@@ -414,8 +414,8 @@ def formula(self):
414
414
"""
415
415
Return the formula of this system, like C3H5O2
416
416
"""
417
- return '' .join (["{}{}" .format (symbol ,numb ) for symbol ,numb in sorted (
418
- zip (self .data ['atom_names' ], self .data ['atom_numbs' ])) ])
417
+ return '' .join (["{}{}" .format (symbol ,numb ) for symbol ,numb in
418
+ zip (self .data ['atom_names' ], self .data ['atom_numbs' ])])
419
419
420
420
421
421
def extend (self , systems ):
@@ -1460,18 +1460,17 @@ def check_atom_names(self, system):
1460
1460
if len (new_in_system ):
1461
1461
# A new atom_name appear, add to self.atom_names
1462
1462
self .atom_names .extend (new_in_system )
1463
- self .atom_names .sort ()
1464
1463
# Add this atom_name to each system, and change their names
1465
1464
new_systems = {}
1466
1465
for each_system in self .systems .values ():
1467
1466
each_system .add_atom_names (new_in_system )
1468
- each_system .sort_atom_names ()
1467
+ each_system .sort_atom_names (type_map = self . atom_names )
1469
1468
new_systems [each_system .formula ] = each_system
1470
1469
self .systems = new_systems
1471
1470
if len (new_in_self ):
1472
1471
# Previous atom_name not in this system
1473
1472
system .add_atom_names (new_in_self )
1474
- system .sort_atom_names ()
1473
+ system .sort_atom_names (type_map = self . atom_names )
1475
1474
1476
1475
def from_quip_gap_xyz_file (self ,file_name ):
1477
1476
# quip_gap_xyz_systems = QuipGapxyzSystems(file_name)
0 commit comments