the important statement in your output message is:
ImportError: No module named site
This usually happens if the python environment variable PYTHONHOME is not defined.
Please also check if the environment variable PYTHONPATH is defined and included in the PATH.
In my bash shell I have set the environment variables as instructed in the exciting oxygen version:
#================================================================================================ #The following shell variables are required for executing scripts in the exciting project work
You can switch $EXCITINGTOOLS for the explicit path. Also make sure you have input.xml in the same directory.
The directory containing sgroup will need to be in your $PATH or just copy sgroup.in to whatever directory sgroup is in.
Thank you Alex for the information.
I did managed to generate sgroup.in file with Be hexagonal lattice parameters.
I also managed to generate the sgroup.out and sgroup.err files.
But these are generated independent of the LATTICE-parameters.sh script.
And when you call the script: LATTICE-parameters.sh input.xml, they are all wiped out.
The challenge is I can’t proceed with the Be General lattice optimization tutorial if the LATTICE-parameters.sh script does not generate the Bravais lattice parameters.
If I move to the following sript: OPTIMIZE-lattice.py this what I get:
[[email protected] Be_OPT]$ …/exciting/tools/LATTICE-parameters.sh input.xml
ImportError: No module named site
a b c alpha beta gamma
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
where $IXML=input.xml. The rest of the script just extracts values from the sgroup.out file.
So if you’re able to get the above calls to work manually, there is no reason the script shouldn’t also work. Have you confirmed input.xml is in the same directory as LATTICE-parameters.sh (or you call as LATTICE-parameters.sh path/to/input.xml' and that sgroup.in` is written to the same directory, following the script execution?
Which script call gives the ImportError? I can’t find an attempt to import that library in our python scripts, which suggests it’s imported by sgroup. Have you tried pip installing the site package?
I need to mention that the sgroup.in file has the following inside:
P
4.3000000000 4.2999798768 6.4500000000 90.0000000000 90.0000000000 120.0001548077
I think this problem has the same origin as the problem pointed out in another post.
In writing explicitly the components of the basis vectors (basevect) or the
coordinates of the atoms (in particular, is they are expressed in crystal coordinates),
one has to be sure that constants like 1/3, sqrt(2), sqrt(3), etc., are given with the correct
number of significant digits:
Still on the volume optimization example:
In directory: ~/Be_OPT/VOL/
I’m trying to extract the equilibrium parameters using OPTIMIZE-lattice.py
This what I get:
python …/…/exciting/tools/OPTIMIZE-lattice.py
Traceback (most recent call last):
File “/mnt/lustre/users/tmosuang/exciting/tools/OPTIMIZE-analyze.py”, line 29, in
from lxml import etree as ET
ImportError: No module named lxml
Still on the hexagonal crystal optimization,I am trying to extract the equilibrium parameters using the script: OPTIMIZE-lattice.py
But the script generates the output files: BM_eos.out; BM-optimized.xml, and energy-vs-volume.
The plot output files BM_eos.png and BM_eos.eps are not generated.
What could be the problem?
Here is the situation:
[[email protected] VOL]$ OPTIMIZE-lattice.py
Murnaghan or Birch-Murnaghan EOS: [M/B] B
=====================================================================
Fit accuracy:
Log(Final residue in [Ha]): -5.43
I don’t remember how I got to the link that didn’t work and I can’t really find it anymore.
Regarding sgroup itself: I downloaded it and ran the makefile. Now when I run OPTIMIZE-lattice.py sgroup works fine and correctly identifies the spacegroup of 2H MoS2. However, now when I run OPTIMIZE-lattice.py I get the following message
File “/home/Documents/EXCITING/exciting/tools/OPTIMIZE-setup.py”, line 400, in
OUTOBJ.write(ET.tostring(root, method =‘xml’,
TypeError: write() argument must be str, not bytes
I ran the script 2to3:
“2to3 -w OPTIMIZE-setup.py”