Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotchem plots bonds outside of unit cell #37

Open
henrikjacobsenfys opened this issue May 25, 2017 · 1 comment
Open

plotchem plots bonds outside of unit cell #37

henrikjacobsenfys opened this issue May 25, 2017 · 1 comment
Labels

Comments

@henrikjacobsenfys
Copy link

henrikjacobsenfys commented May 25, 2017

Hi Sandor
It seems that when an atom is right at the edge of the unit cell, plotchem will plot the bonds from that atom to where they are supposed to be outside the unit cell, even if this goes outside of the desired plot range. An example is given below
Cheers,
Henrik

clear
CuO = spinw;
CuO.fileid(0)
CuO.genlattice('lat_const',[4.684  3.423 5.129],'angled',[90 99.54 90],'sym','C 2/c')
CuO.addatom('r', [1/4 1/4 0],'S', 1/2,'label','Cu','color','blue') 
CuO.gencoupling
CuO.addatom('r', [0 0.416 1/4],'S', 0,'label','O','color','red')
CuO.plot('range',[2 1 2],'cellMode','inside')
swplot.plotchem('atom1','Cu','atom2','O','limit',4,'range',[2 1 2],'mode','bond')
@tsdev
Copy link
Owner

tsdev commented Aug 3, 2017

There is the extend option that you can set to false in case you don't want to plot bonds outside of the plotting range. However I realised it has a bug, I will try to fix it. Meanwhile you can delete individual bonds by using the swplot.findobj() and swplot.delete() functions.

@tsdev tsdev added the bug label Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants