Skip to content

Commit

Permalink
STY: reformat qe_scf_calculation.ipynb with black-jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
mrakitin committed Jul 3, 2023
1 parent d671dbd commit 23e7afc
Showing 1 changed file with 101 additions and 116 deletions.
217 changes: 101 additions & 116 deletions examples/workflow/qe_scf_calculation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,125 +41,110 @@
"source": [
"# payload for workflow creation\n",
"BODY = {\n",
" \"name\": \"Silicon-SCF-bash-REST\",\n",
" \"subworkflows\": [\n",
" {\n",
" \"name\": \"QE-SCF\",\n",
" \"application\": {\n",
" \"name\": \"shell\",\n",
" \"version\": \"4.2.46\",\n",
" \"build\": \"Default\",\n",
" \"isDefault\": \"true\",\n",
" \"summary\": \"Shell Script\",\n",
" \"shortName\": \"sh\"\n",
" },\n",
" \"properties\": [\n",
" \"total_energy\",\n",
" \"fermi_energy\"\n",
" ],\n",
" \"units\": [\n",
" \"name\": \"Silicon-SCF-bash-REST\",\n",
" \"subworkflows\": [\n",
" {\n",
" \"type\": \"execution\",\n",
" \"application\": {\n",
" \"name\": \"shell\",\n",
" \"version\": \"4.2.46\",\n",
" \"build\": \"Default\",\n",
" \"isDefault\": \"true\",\n",
" \"summary\": \"Shell Script\",\n",
" \"shortName\": \"sh\"\n",
" },\n",
" \"head\": \"true\",\n",
" \"input\": [\n",
" {\n",
" \"content\": \"#!/bin/bash\\n# ---------------------- CLUSTER PARAMETERS ---------------------- #\\n#PBS -N Silicon-SCF\\n#PBS -j oe\\n#PBS -l nodes=1\\n#PBS -l ppn=4\\n#PBS -q OR\\n#PBS -l walltime=00:00:30:00\\n#PBS -A seminar-espresso-tutorials\\n# ------------------------- INPUT FILES -------------------------- #\\n# switch to the job working directory\\ncd $PBS_O_WORKDIR\\n\\nBASE_URL='https://github.com/pranabdas/espresso/raw/next/src'\\nIN_FILE='pw.scf.silicon.in'\\nPP_FILE='Si.pz-vbc.UPF'\\n\\n# get QE input file\\nwget ${BASE_URL}/silicon/${IN_FILE} -O ${IN_FILE}\\n\\n# get pseudopotential file\\nwget ${BASE_URL}/pseudos/${PP_FILE} -O ${PP_FILE}\\n\\n# delete pseudo_dir from input file and provide via env\\nsed -i '/^\\\\s*pseudo_dir/d' ${IN_FILE}\\nexport ESPRESSO_PSEUDO='./'\\n\\n# --------------------------- RUN JOB ---------------------------- #\\n# load required module\\nmodule add espresso/63-i-174-impi-044\\n\\n# run the calculation\\nmpirun -np $PBS_NP pw.x -in ${IN_FILE} | tee ${IN_FILE%*.in}.out\\n\\n# ----------------------------- END ------------------------------ #\\n\",\n",
" \"name\": \"pbs-Silicon-scf.sh\"\n",
" }\n",
" ],\n",
" \"name\": \"Silicon-SCF.sh\",\n",
" \"executable\": {\n",
" \"isDefault\": \"true\",\n",
" \"monitors\": [\n",
" \"standard_output\"\n",
" \"name\": \"QE-SCF\",\n",
" \"application\": {\n",
" \"name\": \"shell\",\n",
" \"version\": \"4.2.46\",\n",
" \"build\": \"Default\",\n",
" \"isDefault\": \"true\",\n",
" \"summary\": \"Shell Script\",\n",
" \"shortName\": \"sh\",\n",
" },\n",
" \"properties\": [\"total_energy\", \"fermi_energy\"],\n",
" \"units\": [\n",
" {\n",
" \"type\": \"execution\",\n",
" \"application\": {\n",
" \"name\": \"shell\",\n",
" \"version\": \"4.2.46\",\n",
" \"build\": \"Default\",\n",
" \"isDefault\": \"true\",\n",
" \"summary\": \"Shell Script\",\n",
" \"shortName\": \"sh\",\n",
" },\n",
" \"head\": \"true\",\n",
" \"input\": [\n",
" {\n",
" \"content\": \"#!/bin/bash\\n# ---------------------- CLUSTER PARAMETERS ---------------------- #\\n#PBS -N Silicon-SCF\\n#PBS -j oe\\n#PBS -l nodes=1\\n#PBS -l ppn=4\\n#PBS -q OR\\n#PBS -l walltime=00:00:30:00\\n#PBS -A seminar-espresso-tutorials\\n# ------------------------- INPUT FILES -------------------------- #\\n# switch to the job working directory\\ncd $PBS_O_WORKDIR\\n\\nBASE_URL='https://github.com/pranabdas/espresso/raw/next/src'\\nIN_FILE='pw.scf.silicon.in'\\nPP_FILE='Si.pz-vbc.UPF'\\n\\n# get QE input file\\nwget ${BASE_URL}/silicon/${IN_FILE} -O ${IN_FILE}\\n\\n# get pseudopotential file\\nwget ${BASE_URL}/pseudos/${PP_FILE} -O ${PP_FILE}\\n\\n# delete pseudo_dir from input file and provide via env\\nsed -i '/^\\\\s*pseudo_dir/d' ${IN_FILE}\\nexport ESPRESSO_PSEUDO='./'\\n\\n# --------------------------- RUN JOB ---------------------------- #\\n# load required module\\nmodule add espresso/63-i-174-impi-044\\n\\n# run the calculation\\nmpirun -np $PBS_NP pw.x -in ${IN_FILE} | tee ${IN_FILE%*.in}.out\\n\\n# ----------------------------- END ------------------------------ #\\n\",\n",
" \"name\": \"pbs-Silicon-scf.sh\",\n",
" }\n",
" ],\n",
" \"name\": \"Silicon-SCF.sh\",\n",
" \"executable\": {\n",
" \"isDefault\": \"true\",\n",
" \"monitors\": [\"standard_output\"],\n",
" \"results\": [\n",
" \"atomic_forces\",\n",
" \"band_gaps\",\n",
" \"band_structure\",\n",
" \"density_of_states\",\n",
" \"fermi_energy\",\n",
" \"phonon_dispersions\",\n",
" \"phonon_dos\",\n",
" \"pressure\",\n",
" \"stress_tensor\",\n",
" \"total_energy\",\n",
" \"total_energy_contributions\",\n",
" \"total_force\",\n",
" \"zero_point_energy\",\n",
" \"final_structure\",\n",
" \"magnetic_moments\",\n",
" \"reaction_energy_barrier\",\n",
" \"reaction_energy_profile\",\n",
" \"potential_profile\",\n",
" \"charge_density_profile\",\n",
" ],\n",
" \"name\": \"sh\",\n",
" },\n",
" \"flavor\": {\n",
" \"isDefault\": \"true\",\n",
" \"input\": [{\"name\": \"hello_world.sh\"}],\n",
" \"monitors\": [\"standard_output\"],\n",
" \"applicationName\": \"shell\",\n",
" \"executableName\": \"sh\",\n",
" \"name\": \"hello_world\",\n",
" \"executable\": {\n",
" \"isDefault\": \"true\",\n",
" \"monitors\": [\"standard_output\"],\n",
" \"results\": [\n",
" \"atomic_forces\",\n",
" \"band_gaps\",\n",
" \"band_structure\",\n",
" \"density_of_states\",\n",
" \"fermi_energy\",\n",
" \"phonon_dispersions\",\n",
" \"phonon_dos\",\n",
" \"pressure\",\n",
" \"stress_tensor\",\n",
" \"total_energy\",\n",
" \"total_energy_contributions\",\n",
" \"total_force\",\n",
" \"zero_point_energy\",\n",
" \"final_structure\",\n",
" \"magnetic_moments\",\n",
" \"reaction_energy_barrier\",\n",
" \"reaction_energy_profile\",\n",
" \"potential_profile\",\n",
" \"charge_density_profile\",\n",
" ],\n",
" \"name\": \"sh\",\n",
" },\n",
" },\n",
" }\n",
" ],\n",
" \"results\": [\n",
" \"atomic_forces\",\n",
" \"band_gaps\",\n",
" \"band_structure\",\n",
" \"density_of_states\",\n",
" \"fermi_energy\",\n",
" \"phonon_dispersions\",\n",
" \"phonon_dos\",\n",
" \"pressure\",\n",
" \"stress_tensor\",\n",
" \"total_energy\",\n",
" \"total_energy_contributions\",\n",
" \"total_force\",\n",
" \"zero_point_energy\",\n",
" \"final_structure\",\n",
" \"magnetic_moments\",\n",
" \"reaction_energy_barrier\",\n",
" \"reaction_energy_profile\",\n",
" \"potential_profile\",\n",
" \"charge_density_profile\"\n",
" ],\n",
" \"name\": \"sh\"\n",
" },\n",
" \"flavor\": {\n",
" \"isDefault\": \"true\",\n",
" \"input\": [\n",
" {\n",
" \"name\": \"hello_world.sh\"\n",
" }\n",
" ],\n",
" \"monitors\": [\n",
" \"standard_output\"\n",
" ],\n",
" \"applicationName\": \"shell\",\n",
" \"executableName\": \"sh\",\n",
" \"name\": \"hello_world\",\n",
" \"executable\": {\n",
" \"isDefault\": \"true\",\n",
" \"monitors\": [\n",
" \"standard_output\"\n",
" ],\n",
" \"results\": [\n",
" \"atomic_forces\",\n",
" \"band_gaps\",\n",
" \"band_structure\",\n",
" \"density_of_states\",\n",
" \"fermi_energy\",\n",
" \"phonon_dispersions\",\n",
" \"phonon_dos\",\n",
" \"pressure\",\n",
" \"stress_tensor\",\n",
" \"total_energy\",\n",
" \"total_energy_contributions\",\n",
" \"total_force\",\n",
" \"zero_point_energy\",\n",
" \"final_structure\",\n",
" \"magnetic_moments\",\n",
" \"reaction_energy_barrier\",\n",
" \"reaction_energy_profile\",\n",
" \"potential_profile\",\n",
" \"charge_density_profile\"\n",
" ],\n",
" \"name\": \"sh\"\n",
" }\n",
" }\n",
" }\n",
" ],\n",
" \"compute\": {\n",
" \"ppn\": 4,\n",
" \"nodes\": 1,\n",
" \"queue\": \"OR\",\n",
" \"timeLimit\": \"01:00:00\",\n",
" \"notify\": \"n\",\n",
" \"cluster\": {\n",
" \"fqdn\": \"master-production-20160630-cluster-001.exabyte.io\"\n",
" \"compute\": {\n",
" \"ppn\": 4,\n",
" \"nodes\": 1,\n",
" \"queue\": \"OR\",\n",
" \"timeLimit\": \"01:00:00\",\n",
" \"notify\": \"n\",\n",
" \"cluster\": {\"fqdn\": \"master-production-20160630-cluster-001.exabyte.io\"},\n",
" },\n",
" }\n",
" }\n",
" }\n",
" ]\n",
" ],\n",
"}"
]
},
Expand Down

0 comments on commit 23e7afc

Please sign in to comment.