Thanks again for your prompt answer. I want to access wavefunction elements by their site which are located in a plane for 3D or a line in 2D, I mean no projected wavefunction, just those elements which are related to sites on a plane in 3D system or a line in 2D one. I implemented what you said for 2D system, but I don't get any array for "better_wf(lat(i.j))". It should give me an array (4 elements due to 4 degrees of freedom) for a specific site. If it works, I can change it to the ones I want, but it does not. Here you can find my code:
Your time and consideration are much appreciated.
Best regards,
Ali