Révision cf980c86 modules/screening.py

b/modules/screening.py
311 311
    from copy import deepcopy
312 312
    from ase.neighborlist import natural_cutoffs, neighbor_list
313 313

  
314
    normal = 0
315
    for i, coord in enumerate(vect):
316
        if coord == 0:
317
            continue
318
        normal = i
319
    if vect[normal] > 0:
320
        surf_height = max(slab_molec[:slab_num_atoms].positions[:, normal])
321
    else:
322
        surf_height = min(slab_molec[:slab_num_atoms].positions[:, normal])
323

  
314 324
    # Check structure overlap by height
315 325
    if min_height is not False:
316 326
        cart_axes = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0],
......
327 337
            for i, coord in enumerate(vect):
328 338
                if coord == 0:
329 339
                    continue
330
                if atom.position[i] * coord < min_height * coord:
340
                if (atom.position[i] - surf_height) * coord < min_height:
331 341
                    return True
332 342

  
333 343
    # Check structure overlap by sphere collision

Formats disponibles : Unified diff