Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

""" 

This module provides the Cluster class. 

""" 

 

from _icet import Cluster 

from icet.core.lattice_site import LatticeSite 

from icet.core.structure import Structure 

__all__ = ['Cluster'] 

 

 

def _from_python(atoms, lattice_sites, sort=False, clusterIndex=-1): 

""" 

Construct a cluster from atoms and python lattice sites 

""" 

 

structure = Structure.from_atoms(atoms) 

 

lattice_sites_cpp = [ 

LatticeSite(ls.index, ls.unitcell_offset) for ls in lattice_sites] 

 

return Cluster(structure, lattice_sites_cpp, sort, clusterIndex) 

 

 

Cluster.from_python = _from_python