def compress_cell(structure, volume_change):
    'Apply compression or tensile forces to the unit cell.'
    cell = structure.cell
    new_cell = (np.array(cell) * volume_change)
    structure.reset_cell(new_cell.tolist())
Apply compression or tensile forces to the unit cell.
def compress_cell(structure, volume_change):
    
    cell = structure.cell
    new_cell = (np.array(cell) * volume_change)
    structure.reset_cell(new_cell.tolist())