Comments (9)
You must have the sids package in your PYTHONPATH, i.e. if you do:
python setup.py install --prefix=~/SIDS_PATH
you must add this to your .bashrc
or equivalent .profile
:
export PYTHONPATH=$HOME/SIDS_PATH/lib/python2.7/site-packages:$PYTHONPATH
to enable the sids package.
from sisl.
Hi Nick, many thanks! I will try again! Cheers!
Jin
from sisl.
Hi Nick,
Although running "sgrid -h" displays all possible arguments, I am still a bit confused on how to use these parameters. Would you mind send me an example or a more detailed explanation document? Cheers!
Jin
from sisl.
Hi Jin,
I still need to finish the documentation for the executables.
However, here is a brief show of what you possibly need:
sgrid TotalPotential.grid.nc tp.cube
this will convert the grid in the potential file to a cube called tp.cube.
However, this will not automatically attach a geometry (atomic species and coordinates). To accomplish this, you need to use the -g
or --geometry
flag.
The argument of that flag may be any kind of siesta format for coordinates, fdf, xyz, XV etc.
Hence you can do:
sgrid -g RUN.fdf TotalPotential.grid.nc tp.cube
and the cube will also contain the corresponding atomic coordinates.
If you want the difference between two files, say TS=0V and TS=0.5V you can do this (assuming you are in the folder containing the grid file for TS=0.5V):
sgrid -g RUN.fdf -d ../TSrun_0/TotalPotential.grid.nc TotalPotential.grid.nc diff.cube
which then contains the difference cube. If you are using this for different spins, say with Rho.grid.nc, you can perform these:
sgrid -g RUN.fdf Rho.grid.nc[0] spin_up.cube
sgrid -g RUN.fdf Rho.grid.nc[1] spin_down.cube
where the square bracket denotes the spin-index in the NetCDF file. :)
I think this should cover the most basic need for now?
from sisl.
Hi Nick,
Many thanks for your kind instruction! I still encounter some difficulties.
When I ran the following command as you suggested,
sgrid -g 1Ben_free_0d00V.fdf TotalPotential.grid.nc ppp.cube
the system show
"
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/bin/sgrid", line 241, in
run()
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/bin/sgrid", line 168, in run
args.func(args)
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/bin/sgrid", line 218, in grid_action
g = sids.Grid.read(f, var, idx)
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/lib/python2.7/site-packages/sids/grid.py", line 424, in read
return get_sile(sile).read_grid(args,*kwargs)
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/lib/python2.7/site-packages/sids/io/siesta_grid.py", line 42, in read_grid
with self:
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/lib/python2.7/site-packages/sids/io/sile.py", line 237, in enter
import netCDF4
ImportError: No module named netCDF4
"
So I tried to load netCDF4.3.0 by using "module load netCDF 4.3.0" or write "export NETCDF_PREFIX=/apps/netcdf/4.3.0" in .bashrc. They don't fix the problem. Would you mind make your suggestions? Cheers!
Jin
from sisl.
You need to install the python package netcdf4-python, check the
requirements on the sids front page :)
Kind regards Nick Papior
On 2 Jan 2016 13:00, "jinxyu" [email protected] wrote:
Hi Nick,
Many thanks for your kind instruction! I still encounter some difficulties.
When I ran the following command as you suggested,
sgrid -g 1Ben_free_0d00V.fdf TotalPotential.grid.nc ppp.cube
the system show
"
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/bin/sgrid", line 241, in
run()
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/bin/sgrid", line 168, in run
args.func(args)
File "/home/566/jxy566/LOCAL_APPS/Python-2.7.6/bin/sgrid", line 218, in
grid_action
g = sids.Grid.read(f, var, idx)
File
"/home/566/jxy566/LOCAL_APPS/Python-2.7.6/lib/python2.7/site-packages/sids/grid.py",
line 424, in read
return get_sile(sile).read_grid(_args,_kwargs)
File
"/home/566/jxy566/LOCAL_APPS/Python-2.7.6/lib/python2.7/site-packages/sids/io/siesta_grid.py",
line 42, in read_grid
with self:
File
"/home/566/jxy566/LOCAL_APPS/Python-2.7.6/lib/python2.7/site-packages/sids/io/sile.py",
line 237, in *enter
import netCDF4
ImportError: No module named netCDF4
"
So I tried to load netCDF4.3.0 by using "module load netCDF 4.3.0" or
write "export NETCDF_PREFIX=/apps/netcdf/4.3.0" in .bashrc. They don't fix
the problem. Would you mind make your suggestions? Cheers!Jin
—
Reply to this email directly or view it on GitHub
#2 (comment).
from sisl.
Hi Nick, many thanks!
Jin
from sisl.
I have updated the documentation for a small brief discussion of the sgrid
command, if you have any questions or suggestions to the documentation, please let me know :)
http://zerothi.github.io/sids/bizstyle/scripts/sgrid.html
from sisl.
Dear Nick, many thanks!
Jin
On 04-Jan-16 9:28 AM, Nick R. Papior wrote:
I have updated the documentation for a small brief discussion of the
|sgrid| command, if you have any questions or suggestions to the
documentation, please let me know :)http://zerothi.github.io/sids/bizstyle/scripts/sgrid.html
—
Reply to this email directly or view it on GitHub
#2 (comment).
from sisl.
Related Issues (20)
- Change neighborfinder returns to a tuple of indices and supercell indices HOT 21
- Sisl files not available in readthedocs documentation HOT 18
- Ufuncs could support external classes HOT 4
- `Geometry ` coordinates as f-contiguous array HOT 4
- Streamlining spin/index arguments on `read_grid` methods
- Writing Hamiltonian with sisl from Wannier HOT 3
- `translate2uc` should use boundary conditions (?) HOT 7
- Transport routines within the kubo approach HOT 16
- Disentangle overlap matrix and *other matrices*
- Merging Atom/Orbital etc. HOT 1
- eigenvalues from hamiltonian in presence of magnetic field HOT 2
- Listify breaks documentation HOT 8
- Custom colormaps for 3D plots HOT 3
- numpy 2.0 released -- need to bump stuff HOT 1
- sisl release policy HOT 6
- Docs formatting issue: Missing argument for `\mathbf` HOT 2
- sisl.viz.FatBandsPlot error in fatbands_mode = 'line/scatter' HOT 16
- #496 seems broken on 3.12 HOT 3
- Allow `State.degenerate_decouple`
- Writing Hamiltonian to netcdf HOT 32
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sisl.