hema-ted / pyzfs Goto Github PK
View Code? Open in Web Editor NEWA python package to compute zero-field-splitting tensors for molecules and spin quantum bits in semiconductors.
License: MIT License
A python package to compute zero-field-splitting tensors for molecules and spin quantum bits in semiconductors.
License: MIT License
In the main.py and the qeoader.py files there are TODO items. There is also a commented out deprecated loader for hdf5 files.
There needs to be instructions for how to ask for help, how to report issues and how to contribute.
An example of this is https://github.com/pdebuyl-lab/tidynamics. Other recently accepted JOSS papers are also good examples.
bash run.sh
A good place to put this is a README file in either each individual example directory, or one in the examples
directory explaining all of them.
Hi @hema-ted,
I am working through the installation steps and there are a few points which require clarification in the documentation.
I would like to see the documentation mention the unit tests you have written and how to run them. Something like
There are some unit tests to check functionality which can be run using
python -m unittest
Additionally the examples directory has examples that check the correct working of this software.
I will just note that this isn't a requirement of acceptance of the review, and more an easy improvement I noticed.
In the setup.py file it is possible to specify an entry_point
, that is adding an executable to the path which points to a function through the console_scripts
entry point. This article describes everything in more detail and the setuptools documentation also includes a description of using this functionality.
This allows for using runzfs
instead of python -m pyzfs.exec.runzfs
and removes the need to update the PYTHON_PATH environment variable. An example of the changes required while keeping backwards compatibility are in #2. There are additional updates to the documentation which would be required if you see this change as helpful.
Can these code support the VASP?
Hi @hema-ted, I am naively following the recommended installation method. After I successfully installed pyzfs
with pip install .
, I encountered the following error when I tried to run the program:
% pyzfs --wfcfmt qbox --filename /Users/xwang/Programs/pyzfs/pyzfs/examples/o2_qbox_xml/o2.xml
Traceback (most recent call last):
File "/Users/xwang/anaconda3/bin/pyzfs", line 5, in <module>
from pyzfs.run import main
File "/Users/xwang/anaconda3/lib/python3.6/site-packages/pyzfs/run.py", line 8, in <module>
from .common.misc import parse_sys_argv
ModuleNotFoundError: No module named 'pyzfs.common'
From what I know, pip install .
copies your local packages to site-packages
and install from there. But it only copies those folders that are explicitly specified in the packages
argument of setup()
. Since packages=["pyzfs"]
, the subpackages of pyzfs
were not copied.
Of course one can avoid my mistake by add the pyzfs
source folder to PYTHONPATH
. Or, you can save this step by either:
packages
to include explicitly the subpackages like pyzfs.common
, pyzfs.common.wfc
, etc., orpackages=find_packages()
in setup()
. This will automatically include all folders that contain the __init__.py
file. And this will be especially useful if your program becomes large.To run this example I need to install and run Quantum Espresso.
See also #4
Hi @hema-ted
From what I can tell from the code, the contribution to the accumulation over G-vectors just ignores the contribution at G =[0.0, 0.0, 0.0].
I know that this done to avoid the singularity in the expression (dividing by zero), but I am not sure this just warrants ignoring the term.
Do we have any justification for this?
When attempting to run the pyzfs command line on python2 I get a SyntaxError.
This is because exec
is a statement in python2, having more rules about it's use which are not present in python3, where it works fine.
A fix would be changing the name of the exec module.
Dear Authors,
I followed the instructions to run the diamond_nv_qe_hdf5 example. The first step to run QE to generate wavefunction seemed fine. However, when I run the second step (mpirun pyzfs --wfcfmt qeh5 > zfs.out), I met a bug:
Traceback (most recent call last):
File "/home/linzz/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py", line 121, in make_fid
fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 78, in h5py.h5f.open
OSError: Unable to open file (Unable to lock file, errno = 11, error message = 'resource temporarily unavailable')
Besides, I met some warnings simultaneously, which reads:
/home/linzz/anaconda3/lib/python3.6/site-packages/ase/utils/init.py:41: FutureWarning: Please use atoms.cell.reciprocal()
warnings.warn(warning)
Could you please give me any suggestions to solve these problems?
Thank you very much.
Yours sincerely
Zz Lin
Hi,
I noticed the pyzfs package is based on wavefunction analysis, hence I post my following question relevant to wavefunction analysis. See following for more info.
See the notes from here, as shown below:
The wave function has no direct physical meaning. It is just one way
of storing information. It stores all the information available to
the observer about the system. To make predictions about the outcome
of all measurements, at any time, one has to "do" something to the
wave function to extract information. One has to perform some
mathematical operation on it, such a squaring it, multiplying it by a
constant, differentiating it, etc. One has to operate on the wave
function with some operator. (The operator is a specific instruction
or set of instructions.) Every observable is associated with its own
operator.
I want to know whether it really makes sense to analyze the real or imaginary parts of a wavefunction directly.
Regards,
HY
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.