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

Plotting orbitals #30

Open
tsdev opened this issue Feb 26, 2017 · 3 comments
Open

Plotting orbitals #30

tsdev opened this issue Feb 26, 2017 · 3 comments

Comments

@tsdev
Copy link
Owner

tsdev commented Feb 26, 2017

I am preparing the code for plotting orbitals (orbital-dev branch). It would be a great help if some of you could give a few tips how you would like to use it.
Coordinate system
The most difficult part of the user interface is, that the user needs to define an xyz coordinate system on the atom to show the orbitals. The main question is what would be the easiest/most reasonable way to do it. I have 2 ideas:

  • The user defines the orientation of the xyz coordinate system on the atom by selecting the central atom and 2 ligand atoms. The x-axis will point from central atom to ligand#1, and xy plane will be defined by the 3 atoms. Then I can draw d_xy, d_xz, etc. orbitals.
  • The user selects operators from the point group of the central atom which defines the orientations of the orbitals, for example selecting 4-fold rotation axes would set it to z-axis, etc. This is not yet clear how would work in the general case.
  • Which option (or a 3rd one) would you prefer to input the orientation of the orbitals?

Symmetry transformations
After the user defined the orientation of the orbital on a selected atom, the orbital orientation will be transformed to all symmetry equivalent atoms. This could be switched off if the user requests (the system has lower symmetry than the given space group).

I am also curious any other new ideas!
Example script plotting d_xy (works with orbital-dev branch):

R = [0 0 0;1 0 0;1 1 0;0 1 0]';
T = sw_rotmatd([0 0 1],90);
T = cat(3,T,T^2,T^3,T^4);
swplot.plot('type','orbital','qLabel','d_xy','position',R,'T',T,'scale',0.03,'nPatch',100,'color',{'red' 'green'});

And the result:
http://pasteboard.co/D8UAtHj5S.png

@PascalManuel
Copy link

Having discussed it with a couple of interest people, we came to the conclusion that the first option is best since it is often the case that the central atom takes a Wyckoff position with site symmetry 1 so it will be the most general option.

@tsdev
Copy link
Owner Author

tsdev commented Mar 9, 2017

I implemented plotting orbitals, it is in the orbital-dev branch submission 1b66d52. Now you can plot p and d orbitals and the code will use the space group information to transform the orbitals on symmetry equivalent positions. For example the following code defines a fictitious crystal with P4 symmetry and puts d_xy orbitals at (1/4,1/4,1/2) and symmetry equivalent positions:

quad = spinw;
quad.genlattice('lat_const',[6 6 4],'spgr','P 4')
quad.addatom('r',[1/4 1/4 1/2],'S',1,'label','atom1')
plot(quad)
swplot.plotorbital('center',r0,'ligand1',[1 0 0],'ligand2',[0 1 0],'type','d_xy','color','red','color2','blue')

The result of the code is the following:
screen shot 2017-03-09 at 14 04 23
Let me know if it worked for you and if there is any issue with the new code!

@PascalManuel
Copy link

PascalManuel commented Mar 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants