Dear Hossein,
You can do that easily with "del":
import random
Sites=syst.finalized().sites
To_delete=random.sample(Sites, 23) # choose 23 sites to delete
del syst[To_delete]
kwant.plot(syst)
I hope this helps,
Adel
On Tue, Jun 20, 2023 at 3:47 PM Hossein Karbaschi
wrote:
> Hi everybody,
>
>
Hello fellow Kwanters,
I am happy to announce Pymablock, a Python package useful to combine
with Kwant. Its main purpose is constructing effective models using
perturbation theory, which may help you in different ways.
Pymablock allows you to analyse the behavior of a few levels of a
large Hamilto
Hi everybody,
In the following code I want to delete few random sites from the scattering
region.
Please help me in this case.
Best regards,
Hossein
import kwant
from math import sqrt
import matplotlib.pyplot as plt
import tinyarray
import numpy as np
import math
import matplotlib
#Constants