097217a383e91ea4d11448a55dff79c748cf641d,describe/utils/stats.py,,system_stats,#Any#,6

Before Change


            distance_matrix = atoms.get_all_distances(mic=True)
        elif isinstance(atoms, System):
            i_atomic_numbers = set(atoms.numbers)
            i_symbols = set(atoms.symbols)
            distance_matrix = atoms.get_periodic_distances()

        // Gather atomic numbers and symbols
        atomic_numbers = atomic_numbers.union(i_atomic_numbers)

After Change



        // Make ASE.Atoms into a System object
        if isinstance(system, Atoms):
            system = System.from_atoms(system)

        i_atomic_numbers = set(system.get_atomic_numbers())
        i_symbols = set(system.get_chemical_symbols())
        distance_matrix = system.get_distance_matrix()

        // Gather atomic numbers and symbols
        atomic_numbers = atomic_numbers.union(i_atomic_numbers)
        symbols = symbols.union(i_symbols)

        // Gather maximum number of atoms
        if n_atoms > n_atoms_max:
            n_atoms_max = n_atoms

        // Gather min distance. For periodic systems we must also consider
        // distances from an atom to it"s periodic copy, as given by
        // get_distance_matrix() on the diagonal.
        if np.any(system.get_pbc()):
            triu_indices = np.triu_indices(len(distance_matrix), k=0)
        else:
            triu_indices = np.triu_indices(len(distance_matrix), k=1)
        distances = distance_matrix[triu_indices]
        i_min_dist = distances.min()

        if min_distance is None or i_min_dist < min_distance:
            min_distance = i_min_dist

    return {
        "n_atoms_max": n_atoms_max,
        "max_atomic_number": max(list(atomic_numbers)),
        "min_atomic_number": min(list(atomic_numbers)),
        "atomic_numbers": list(atomic_numbers),
        "element_symbols": list(symbols),
        "min_distance": min_distance,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: SINGROUP/dscribe
Commit Name: 097217a383e91ea4d11448a55dff79c748cf641d
Time: 2017-08-08
Author: lauri.himanen@aalto.fi
File Name: describe/utils/stats.py
Class Name:
Method Name: system_stats


Project Name: keras-team/autokeras
Commit Name: c64c9eeb8120a5f293de07a0992714d522453a55
Time: 2018-12-28
Author: chenwydj@gmail.com
File Name: autokeras/pretrained/object_detector.py
Class Name: ObjectDetector
Method Name: predict


Project Name: dit/dit
Commit Name: d738388c3ac14684d384b05d7e03417a0edffdd1
Time: 2016-05-11
Author: ryangregoryjames@gmail.com
File Name: dit/multivariate/dilworth.py
Class Name:
Method Name: dilworth