To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 7389f941 authored by spiasko's avatar spiasko
Browse files

ex11 gelöst

parent f88897db
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
......@@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 3,
"metadata": {},
"outputs": [
{
......@@ -64,19 +64,16 @@
"alpha=90\n",
"beta=99.22\n",
"gamma=90\n",
"thespacegroup=14\n",
"thespacegroup='P 21/c'\n",
"print(Spacegroup(thespacegroup))\n",
"\n",
"hfo2 = crystal(symbols=['Hf','O','O'],\n",
" basis=[(0.276,0.04,0.208),(0.074,0.332,0.347),(0.449,0.758,0.480)],\n",
" spacegroup=thespacegroup, \n",
" cellpar=[a, b, c, alpha, beta, gamma])\n",
"#hfo2.write('hfo2.xyz')"
"hfo2 = crystal(['Hf','O','O'],basis=[(0.276,0.04,0.208),(0.074,0.332,0.347),(0.449,0.758,0.480)], \n",
" spacegroup=thespacegroup, cellpar=[a, b, c, alpha, beta, gamma])"
]
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
......@@ -92,13 +89,13 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "173ee9fd9ff14be7a76bdd69a69afbe2",
"model_id": "f9c3ef4efca74690a7d6ac1e4a8d450a",
"version_major": 2,
"version_minor": 0
},
......@@ -133,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
......@@ -152,7 +149,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
......@@ -208,13 +205,13 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7261855ebc41485c8822834f33016a8d",
"model_id": "7ee7ec2cab1844de870258a5a5674dfc",
"version_major": 2,
"version_minor": 0
},
......@@ -237,29 +234,28 @@
"metadata": {},
"outputs": [],
"source": [
"cell = ase_to_spgcell(ase_atoms=atoms)\n",
"lattice, scaled_positions, numbers = spglib.find_primitive(cell, symprec=1e-5)\n",
"reduced = ase_to_spgcell(cell=(lattice, scaled_positions, numbers),inverse=True)"
"''' \n",
"\n",
" ..TO DO..\n",
"\n",
"'''"
]
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c0b014720e3d4c09b7430432c38b0056",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"NGLWidget()"
]
},
"metadata": {},
"output_type": "display_data"
"ename": "NameError",
"evalue": "name 'reduced' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-10-e82cf4dbf780>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mnglview\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshow_ase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mreduced\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'reduced' is not defined"
]
}
],
"source": [
......@@ -279,12 +275,11 @@
"metadata": {},
"outputs": [],
"source": [
"versions = [read(atoms) for atoms in glob('./quartz_alpha*')]\n",
"''' \n",
"\n",
" ..TO DO..\n",
"\n",
"for outer in range(len(versions)-1):\n",
" for inner in range(outer+1,len(versions)):\n",
" print('Comparing: ',outer,inner)\n",
" print('Equivalent: ',a_equiv_b(versions[outer],versions[inner]))"
"'''"
]
}
],
......@@ -304,7 +299,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.6.7"
}
},
"nbformat": 4,
......
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
......@@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 3,
"metadata": {},
"outputs": [
{
......@@ -58,22 +58,22 @@
}
],
"source": [
"a=...\n",
"b=...\n",
"c=...\n",
"alpha=...\n",
"beta=...\n",
"gamma=...\n",
"thespacegroup=...\n",
"a=5.117\n",
"b=5.175\n",
"c=5.291\n",
"alpha=90\n",
"beta=99.22\n",
"gamma=90\n",
"thespacegroup='P 21/c'\n",
"print(Spacegroup(thespacegroup))\n",
"\n",
"hfo2 = crystal(['...','...','...'],basis=[(...,...,...),(...,...,...),(...,...,...)], \n",
"hfo2 = crystal(['Hf','O','O'],basis=[(0.276,0.04,0.208),(0.074,0.332,0.347),(0.449,0.758,0.480)], \n",
" spacegroup=thespacegroup, cellpar=[a, b, c, alpha, beta, gamma])"
]
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
......@@ -89,13 +89,13 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "173ee9fd9ff14be7a76bdd69a69afbe2",
"model_id": "f9c3ef4efca74690a7d6ac1e4a8d450a",
"version_major": 2,
"version_minor": 0
},
......@@ -130,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
......@@ -149,7 +149,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
......@@ -205,13 +205,13 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7261855ebc41485c8822834f33016a8d",
"model_id": "7ee7ec2cab1844de870258a5a5674dfc",
"version_major": 2,
"version_minor": 0
},
......@@ -243,22 +243,19 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c0b014720e3d4c09b7430432c38b0056",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"NGLWidget()"
]
},
"metadata": {},
"output_type": "display_data"
"ename": "NameError",
"evalue": "name 'reduced' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-10-e82cf4dbf780>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mnglview\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshow_ase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mreduced\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'reduced' is not defined"
]
}
],
"source": [
......@@ -302,7 +299,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.6.7"
}
},
"nbformat": 4,
......
This diff is collapsed.
This diff is collapsed.
&control
verbosity='high'
calculation='scf'
restart_mode='from_scratch'
prefix='SI'
pseudo_dir = './',
outdir='./'
wf_collect=.true.
/
&system
ibrav=1
celldm(1)=10.26121694631474912930
nat=8,
ntyp=1,
ecutwfc = 30,
occupations='smearing',
degauss=0.001
/
&electrons
conv_thr = 1.0e-8
mixing_beta = 0.5
/
&ions
/
ATOMIC_SPECIES
Si 28.086 Si.pbe-mt_fhi.UPF
ATOMIC_POSITIONS crystal
Si 0.000000 0.000000 0.000000
Si 0.000000 0.500000 0.500000
Si 0.500000 0.000000 0.500000
Si 0.500000 0.500000 0.000000
Si 0.750000 0.250000 0.750000
Si 0.250000 0.250000 0.250000
Si 0.250000 0.750000 0.750000
Si 0.750000 0.750000 0.250000
K_POINTS automatic
1 1 1 0 0 0
This diff is collapsed.
#!/bin/bash --login
#SBATCH --job-name="TASK_0"
#SBATCH --nodes=1 # the number of ranks (total)
#SBATCH --ntasks-per-node=12 # the number of ranks per node
##SBATCH --ntasks-per-core=1 # enable this if you want hyperthreading
#SBATCH --cpus-per-task=1 # use this for threaded applications
#SBATCH --time=00:10:00
#SBATCH --constraint=gpu
#SBATCH --account=YOUR_ACCOUNT
##SBATCH --partition=normal
#SBATCH --output="c1"
module load daint-gpu
export CRAY_CUDA_MPS=1
module load QuantumESPRESSO/6.3-CrayIntel-18.08
#======START=====
a=5.43
alat=`echo "${a} / 0.529177" | bc -l`
cat >pw.in << EOF
&control
verbosity='high'
calculation='scf'
restart_mode='from_scratch'
prefix='SI'
pseudo_dir = './',
outdir='./'
wf_collect=.true.
/
&system
ibrav=1
celldm(1)=${alat}
nat=8,
ntyp=1,
ecutwfc = 30,
occupations='smearing',
degauss=0.001
/
&electrons
conv_thr = 1.0e-8
mixing_beta = 0.5
/
&ions
/
ATOMIC_SPECIES
Si 28.086 Si.pbe-mt_fhi.UPF
ATOMIC_POSITIONS crystal
Si 0.000000 0.000000 0.000000
Si 0.000000 0.500000 0.500000
Si 0.500000 0.000000 0.500000
Si 0.500000 0.500000 0.000000
Si 0.750000 0.250000 0.750000
Si 0.250000 0.250000 0.250000
Si 0.250000 0.750000 0.750000
Si 0.750000 0.750000 0.250000
K_POINTS automatic
1 1 1 0 0 0
EOF
srun -n $SLURM_NTASKS --ntasks-per-node=$SLURM_NTASKS_PER_NODE -c $SLURM_CPUS_PER_TASK --cpu_bind=rank --hint=nomultithread pw.x <pw.in > si.out
This diff is collapsed.
&control
verbosity='high'
calculation='scf'
restart_mode='from_scratch'
prefix='SI'
pseudo_dir = './',
outdir='./'
wf_collect=.true.
/
&system
ibrav=1
celldm(1)=10.26121694631474912930
nat=8,
ntyp=1,
ecutwfc = 30,
occupations='smearing',
degauss=0.001
/
&electrons
conv_thr = 1.0e-8
mixing_beta = 0.5
/
&ions
/
ATOMIC_SPECIES
Si 28.086 Si.pbe-mt_fhi.UPF
ATOMIC_POSITIONS crystal
Si 0.000000 0.000000 0.000000
Si 0.000000 0.500000 0.500000
Si 0.500000 0.000000 0.500000
Si 0.500000 0.500000 0.000000
Si 0.750000 0.250000 0.750000
Si 0.250000 0.250000 0.250000
Si 0.250000 0.750000 0.750000
Si 0.750000 0.750000 0.250000
K_POINTS automatic
2 2 2 0 0 0
This diff is collapsed.
#!/bin/bash --login
#SBATCH --job-name="TASK_0b"
#SBATCH --nodes=1 # the number of ranks (total)
#SBATCH --ntasks-per-node=12 # the number of ranks per node
##SBATCH --ntasks-per-core=1 # enable this if you want hyperthreading
#SBATCH --cpus-per-task=1 # use this for threaded applications
#SBATCH --time=00:10:00
#SBATCH --constraint=gpu
#SBATCH --account=YOUR_ACCOUNT
##SBATCH --partition=normal
#SBATCH --output="c1"
module load daint-gpu
export CRAY_CUDA_MPS=1
module load QuantumESPRESSO/6.3-CrayIntel-18.08
a=5.43
alat=`echo "${a} / 0.529177" | bc -l`
cat >pw.in << EOF
&control
verbosity='high'
calculation='scf'
restart_mode='from_scratch'
prefix='SI'
pseudo_dir = './',
outdir='./'
wf_collect=.true.
/
&system
ibrav=1
celldm(1)=${alat}
nat=8,
ntyp=1,
ecutwfc = 30,
occupations='smearing',
degauss=0.001
/
&electrons
conv_thr = 1.0e-8
mixing_beta = 0.5
/
&ions
/
ATOMIC_SPECIES
Si 28.086 Si.pbe-mt_fhi.UPF
ATOMIC_POSITIONS crystal
Si 0.000000 0.000000 0.000000
Si 0.000000 0.500000 0.500000
Si 0.500000 0.000000 0.500000
Si 0.500000 0.500000 0.000000
Si 0.750000 0.250000 0.750000
Si 0.250000 0.250000 0.250000
Si 0.250000 0.750000 0.750000
Si 0.750000 0.750000 0.250000
K_POINTS automatic
2 2 2 0 0 0
EOF
srun -n $SLURM_NTASKS --ntasks-per-node=$SLURM_NTASKS_PER_NODE -c $SLURM_CPUS_PER_TASK --cpu_bind=rank --hint=nomultithread pw.x <pw.in > si.out
This diff is collapsed.
&control
verbosity='high'
calculation='scf'
restart_mode='from_scratch'
prefix='SI'
pseudo_dir = './',
outdir='./'
wf_collect=.true.
/
&system
ibrav=1
celldm(1)=10.26121694631474912930
nat=8,
ntyp=1,
ecutwfc = 30,
occupations='smearing',
degauss=0.001
/
&electrons
conv_thr = 1.0e-8
mixing_beta = 0.5
/
&ions
/
ATOMIC_SPECIES
Si 28.086 Si.pbe-mt_fhi.UPF
ATOMIC_POSITIONS crystal
Si 0.000000 0.000000 0.000000
Si 0.000000 0.500000 0.500000
Si 0.500000 0.000000 0.500000
Si 0.500000 0.500000 0.000000
Si 0.750000 0.250000 0.750000
Si 0.250000 0.250000 0.250000
Si 0.250000 0.750000 0.750000
Si 0.750000 0.750000 0.250000
K_POINTS automatic
2 2 2 1 1 1
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment