From 5672280954518fa1a5c2bd351a8c04769ca4cc1a Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Tue, 27 Jul 2021 10:20:46 +0200 Subject: [PATCH 01/15] Hot fix branch (#176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Explain changes to the development workflow involving new hotfix branch. Authored-by: kysrpex Authored-by: José Manuel Domínguez --- docs/source/_static/img/branch_workflow.png | Bin 40228 -> 0 bytes docs/source/_static/img/branch_workflow.svg | 3 ++ docs/source/contribute.md | 43 +++++++++++++++----- 3 files changed, 35 insertions(+), 11 deletions(-) delete mode 100644 docs/source/_static/img/branch_workflow.png create mode 100644 docs/source/_static/img/branch_workflow.svg diff --git a/docs/source/_static/img/branch_workflow.png b/docs/source/_static/img/branch_workflow.png deleted file mode 100644 index 0987c3bae9b5f168b621329a37b703a98b0cc739..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 40228 zcmb5WN3O+MvL%-42tolh0re9oHC}?=H0k}JH;0`Ry(bU7nL$lPO^rq!4M8)|=6k2H7g+kaMM-T}Y=ufP56fB4`3r~eUL z{cr#0|JwZRZ|?uG3DGuOWz!db`#Z}0b@g`ys;71PJIenZL4>}@wq+W@C1@X}yeXR^ z|LZ#hLf}6j z**oWAORB%-8)y{deFC)-K6YV9=h^;o{WZ^{Sk?wC(w|HA-@1Mu-tJ%VS8HAzO$NsC zw*J7ntp9d1=ok4rDuC6`o1|Kj0es*5+XA~a&if>L$&cL*bLCz%`RDBjG$vq9fA$96 z`^PygUD;3PU$4T0CC)bE6fG#RDAn(OW!I&)SXYuXLfRLaa&dK7?LYvaO3Kku$@AqCp`+a z%9rdk1njohk&mQ)k6^$A6#dw}+ZJFO>PAdO$UDPTkA}pcO4wVMQP>#P!czU9!Gj5l zjA|qKI6j`FTGLxqj+tohrA&I|JDGxf$h?fTXVk1jS@w{@!xRrV$yxhvf=Q;wR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Nvs#p&zH8AmT=UNK zArDR8z5UKx+W%jE=@oQr-#OpFmi~8r6WG!Bt|0zu&#rv75Y2O`x8I+UEdeq0arK^5 zcw+k|u>N~{h{-)r_2~D2ZQCt=9iZm<-@y#1I z@XGKB2x-y~?Vs+DugPtsPfUGh0{qusezP^Fiz>uq#N_p#B6aU!mwjRim$c>+Tl0F) z{%^GYGYy9MvMH?+;)0sZ^cyv6?+<#wHuz)@l73(-Y3&NzV3J&;Nx(945HG&(Itu|+ezC_`*NI$fcBIXoTJN*j6Bk4}rGv>3b+P4VbnPx)+AT0o?tIqj&g zY2SZ!)Xa9~iRpU+Q8a@^b6UI%?7tVycxs-v3Tus);g93`^=l4Cr&Ttk>A9vttg^{q z<+Oa&C$_RC?&M7c#IBy_tV!%DUSas1Ay!}|hFDHSvmq8u*cS&5ziVz-F6Y*W%@8ZF z14Aq)qS+A3<<9!C8Da%CVu|XKU?w=iy)!E gt}nVs#OA2~9}MWBR>nIrumAu607*qoM6N<$f(*u~jsO4v diff --git a/docs/source/_static/img/branch_workflow.svg b/docs/source/_static/img/branch_workflow.svg new file mode 100644 index 0000000..df7ed10 --- /dev/null +++ b/docs/source/_static/img/branch_workflow.svg @@ -0,0 +1,3 @@ + + +
Merge to dev from issue branches using a Squash commit
Merge to dev from...
Merge from hotfix branches both to master and dev, using a Squash commit
Merge from hotfix...
Merge to master from dev using a Merge commit
Merge to master f...
master
master
xyz-hotfix
xyz-hotfix
dev
dev
xyz-issue
xyz-issue
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/docs/source/contribute.md b/docs/source/contribute.md index 2774f1b..6a752bb 100644 --- a/docs/source/contribute.md +++ b/docs/source/contribute.md @@ -10,7 +10,8 @@ It might be useful to become familiar with them: - Python virtual environments/conda - Docker - Unittesting - - Continuous Integration + - Benchmarks + - Continuous integration ### Code Organisation There are 3 main categories of repos: @@ -19,10 +20,11 @@ There are 3 main categories of repos: mimicking [wrapper_development](https://github.com/simphony/wrapper-development). - [_docs_](https://github.com/simphony/docs) holds the source for this documentation. -There are also 3 types of branches: +There are also 4 types of branches: - `master/main` contains all the releases, and should always be stable. - `dev` holds the code for the newest release that is being developed. - - `issue branch` is where an specific issues is being solved. + - `issue branch` is where an specific issue is being solved. + - `hotfix branch` is where a critical software bug detected on the stable release (more on this later) is being solved. All wrappers and OSP-core are part of a common directory structure: - _`osp/`_: contains all the SimPhoNy source code. @@ -36,18 +38,34 @@ All wrappers and OSP-core are part of a common directory structure: - Every new feature or bug is defined in an issue and labelled accordingly. If there is something that is missing or needs improving, make an issue in the appropriate project. -- For each new release a milestone is created and assigned to issues and Pull/Merge Requests. -- The issues are fixed by creating a new `issue branch` from the `dev` branch, committing to that branch and making a new Pull/Merge Request when done. +- Generally, the issues are fixed by creating a new `issue branch` from the `dev` branch, committing to that branch and making a new Pull/Merge Request when done. An owner of the project should be tagged for review. - They will review and merge the PR if the fix is correct. + They will review and merge the PR if the fix is correct, deleting the `issue branch` afterwards. The changes should be clearly explained in the issue/Pull Request. -- Once the features for a release have been reached, `dev` will be merged to `master/main`, every commit in the `master/main` branch theoretically being a new release. - -In the next image it can be seen how the branches usually look during this workflow, and the different commits used to synchronise them: +```eval_rst +.. warning:: + If the issue is a critical software bug detected in the stable release, a + :code:`hotfix branch` should be created from the :code:`master/main` branch + instead. + + After committing to such branch, a new Pull/Merge request (targeting + :code:`dev`) should be created. If the fix is correct, the project owner + will merge the PR to :code:`dev`, additionally merge the + :code:`hotfix branch` to :code:`master/main`, and then delete the + :code:`hotfix branch`. +``` +- Once the features for a release have been reached, `dev` will be merged to + `master/main`. Every new commit in the `master/main` branch generally corresponds + a new release. An exception to this rule may apply, for example when several + critical hotfixes are applied in a row, as it would then be better to just to + publish a single release afterwards. + +In the next image it can be seen how the branches usually look during this +workflow, and the different commits used to synchronise them:
-![](./_static/img/branch_workflow.png "Branches and commits") +![](./_static/img/branch_workflow.svg "Branches and commits")
@@ -65,7 +83,10 @@ In the next image it can be seen how the branches usually look during this workf ### Continuous Integration - We currently run the CI through Github Actions/GitLab CI. -- Flake8 and unittests are automatically run for all PR. +- Flake8 and unittests are automatically run for all PR. +- For the OSP-core code, benchmarks are run after every merge to `dev`. Benchmark results are + available [here](https://simphony.github.io/osp-core/dev/bench/index.html). + The CI will report a failure when a benchmark is 50% slower than in the previous run, in addition to automatically commenting on the commit. ### Naming conventions - Use `cuds_object` as the argument name of your methods (not `entity`, `cuds`, `cuds_instance`...). From 354307796c531bdce4ef5c0c900fc8bcdc11879f Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Tue, 27 Jul 2021 10:23:33 +0200 Subject: [PATCH 02/15] Semantic versioning (#177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Link to semantic versioning rules. Authored-by: kysrpex Authored-by: José Manuel Domínguez Authored-by: José Manuel Domínguez <43052541+kysrpex@users.noreply.github.com> --- docs/source/contribute.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/source/contribute.md b/docs/source/contribute.md index 6a752bb..362ce7e 100644 --- a/docs/source/contribute.md +++ b/docs/source/contribute.md @@ -56,12 +56,14 @@ All wrappers and OSP-core are part of a common directory structure: ``` - Once the features for a release have been reached, `dev` will be merged to `master/main`. Every new commit in the `master/main` branch generally corresponds - a new release. An exception to this rule may apply, for example when several + to a new release, which is labeled with a + [git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) matching its + version number. An exception to this rule may apply, for example when several critical hotfixes are applied in a row, as it would then be better to just to - publish a single release afterwards. + publish a single release afterwards. In regard to version numbering, we adhere to the + [_Semantic versioning_](https://semver.org/) rules. -In the next image it can be seen how the branches usually look during this -workflow, and the different commits used to synchronise them: +In the next image it can be seen how the branches usually look during this workflow, and the different commits used to synchronise them:
From 614c1f6bc92d0f165ff326696b519010fe67aef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Dom=C3=ADnguez?= <43052541+kysrpex@users.noreply.github.com> Date: Tue, 27 Jul 2021 10:24:47 +0200 Subject: [PATCH 03/15] Bump version and update compatibility table for OSP-core hotfix 3.5.5 (#178) --- docs/source/links.md | 1 + packageinfo.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/links.md b/docs/source/links.md index e49d1ae..c71576d 100644 --- a/docs/source/links.md +++ b/docs/source/links.md @@ -57,6 +57,7 @@ The following table describes the compatibilities between of SimPhoNy docs and O ============= ========== SimPhoNy docs OSP-core ============= ========== + 2.4.3 3.5.5 2.4.2 3.5.4 2.4.1 3.5.3.1-beta 2.4.0 3.5.2-beta diff --git a/packageinfo.py b/packageinfo.py index 030863a..74d1b4d 100644 --- a/packageinfo.py +++ b/packageinfo.py @@ -1,2 +1,2 @@ NAME = "simphony_docs" -VERSION = "2.4.2" +VERSION = "2.4.3" From cf9723d5d3c93df85d89e7056f4de5fc08619297 Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Mon, 9 Aug 2021 09:41:57 +0200 Subject: [PATCH 04/15] Remove ssh option from git clone --- docs/source/installation.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/source/installation.md b/docs/source/installation.md index 37b6fcf..9305138 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -16,12 +16,11 @@ or a [conda](https://docs.conda.io/en/latest/) environment: ~/test$ conda activate ``` - ## OSP-core installation First, the repository must be cloned: ```shell -git clone git@github.com:simphony/osp-core.git +git clone https://github.com/simphony/osp-core.git cd osp-core ``` @@ -60,7 +59,7 @@ python -m osp.core.pico install The installation of a wrapper is similar. First, the repository is cloned: ```shell -git clone git@github.com:simphony/.git +git clone https://github.com/simphony/.git cd some-wrapper ``` ### Local wrapper installation From e0b632c039adb2427ee138913ea6f0877e1919cb Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Mon, 9 Aug 2021 09:44:39 +0200 Subject: [PATCH 05/15] Change colour palette of PlantUML graphs (#180) --- docs/source/detailed_design.md | 101 ++++++++++++++++++++++++++++ docs/source/fundamentals.md | 37 ++++++++++ docs/source/general_architecture.md | 44 +++++++++--- docs/source/wrapper_development.md | 12 ++++ 4 files changed, 186 insertions(+), 8 deletions(-) diff --git a/docs/source/detailed_design.md b/docs/source/detailed_design.md index cdcb7dc..14360fa 100644 --- a/docs/source/detailed_design.md +++ b/docs/source/detailed_design.md @@ -9,6 +9,22 @@ For a more general overview, go to [getting started](./getting_started.md#genera :caption: Standard design :align: center + skinparam { + Shadowing false + BackgroundColor transparent + ClassBackgroundColor #E3E3E3 + ClassBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + InterfaceBackgroundColor transparent + InterfaceBorderColor #179c7d + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + PackageBorderColor black + PackageBackgroundColor #9FC6DE + ArrowColor #179c7d + } + allow_mixing actor User @@ -203,6 +219,21 @@ cuds_obj = some_namespace.OntologyClass() :caption: `add` method call :align: center + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + actor user box "Semantic Layer" participant "cuds" as cuds @@ -243,6 +274,21 @@ cuds_obj = some_namespace.OntologyClass() :caption: `get` method call :align: center + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + actor user box "Semantic Layer" participant "cuds" as cuds @@ -286,6 +332,21 @@ cuds_obj = some_namespace.OntologyClass() :caption: `update` method call :align: center + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + actor user box "Semantic Layer" participant "cuds" as cuds @@ -327,6 +388,21 @@ cuds_obj = some_namespace.OntologyClass() :caption: `remove` method call :align: center + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + actor user box "Semantic Layer" participant "cuds" as cuds @@ -363,6 +439,21 @@ cuds_obj = some_namespace.OntologyClass() :caption: `iter` method call :align: center + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + actor user box "Semantic Layer" participant "cuds" as cuds @@ -421,6 +512,16 @@ To simplify and group functionality, we built an inheritance scheme: :caption: Session inheritance scheme :align: center + skinparam { + Shadowing false + BackgroundColor transparent + ClassBackgroundColor #E3E3E3 + ClassBorderColor black + PackageBorderColor black + PackageBackgroundColor #9FC6DE + ArrowColor #179c7d + } + rectangle "OSP-core" as OSP { abstract class Session { Registry : registry diff --git a/docs/source/fundamentals.md b/docs/source/fundamentals.md index 6d8fb40..32001c3 100644 --- a/docs/source/fundamentals.md +++ b/docs/source/fundamentals.md @@ -16,6 +16,15 @@ Based on how tools communicate with other tools, we can define 3 levels: .. uml:: :align: center :caption: Compatibility + + skinparam { + linetype ortho + Shadowing false + BackgroundColor transparent + RectangleBackgroundColor #E3E3E3 + RectangleBorderColor black + ArrowColor #179c7d + } rectangle A rectangle B @@ -39,6 +48,14 @@ Based on how tools communicate with other tools, we can define 3 levels: .. uml:: :align: center :caption: De Facto Standard + + skinparam { + Shadowing false + BackgroundColor transparent + RectangleBackgroundColor #E3E3E3 + RectangleBorderColor black + ArrowColor #179c7d + } rectangle A rectangle B @@ -64,6 +81,17 @@ Based on how tools communicate with other tools, we can define 3 levels: .. uml:: :align: center :caption: Interoperability + + skinparam { + linetype ortho + Shadowing false + BackgroundColor transparent + RectangleBackgroundColor #E3E3E3 + RectangleBorderColor black + UsecaseBackgroundColor transparent + UsecaseBorderColor #55A5D9 + ArrowColor #179c7d + } usecase x as "open standard" rectangle A @@ -167,6 +195,15 @@ For the IRIs, `dbpedia`'s namespace was used. :align: center :caption: RDF triple sample + skinparam { + linetype ortho + Shadowing false + BackgroundColor transparent + UsecaseBorderColor black + UsecaseBackgroundColor #E3E3E3 + ArrowColor #179c7d + } + (dbr:J._R._R._Tolkien) as tolkien (dbr:The_Lord_of_the_Rings) as lotr lotr -> tolkien : dbo:author diff --git a/docs/source/general_architecture.md b/docs/source/general_architecture.md index d78de8b..5bab24d 100644 --- a/docs/source/general_architecture.md +++ b/docs/source/general_architecture.md @@ -6,10 +6,26 @@ The following architecture has the aim to cover and support the goals presented :align: center :caption: Interoperability concept - skinparam linetype ortho + skinparam { + linetype ortho + Shadowing false + BackgroundColor transparent + UsecaseBackgroundColor #E3E3E3 + UsecaseBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + PackageBorderColor black + PackageBackgroundColor #9FC6DE + ArrowColor #179c7d + ranksep 10 + } + + actor user rectangle SimPhoNy { - usecase "OSP-core" as osp #FFFFFF + usecase "OSP-core" as osp usecase "database\nwrapper" as db_wrapper usecase "simulation\nwrapper" as sim_wrapper usecase wrapper @@ -46,14 +62,26 @@ For that, a 3 layer schema is used: :caption: Three layered design :align: center - skinparam linetype ortho + skinparam { + linetype ortho + Shadowing false + BackgroundColor transparent + RectangleBackgroundColor #E3E3E3 + RectangleBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + PackageBorderColor #55A5D9 + PackageBackgroundColor transparent + ArrowColor #179c7d + ranksep 10 + } skinparam rectangle<> { - backgroundColor Transparent - borderColor Transparent - titleFontColor Red - stereotypeFontColor Transparent - shadowing false + BorderColor Transparent + BackgroundColor transparent + stereotypeFontColor transparent } Actor user diff --git a/docs/source/wrapper_development.md b/docs/source/wrapper_development.md index 945a159..5f10f0d 100644 --- a/docs/source/wrapper_development.md +++ b/docs/source/wrapper_development.md @@ -114,6 +114,18 @@ sessions. :caption: Simplified session inheritance scheme :align: center + skinparam { + Shadowing false + BackgroundColor transparent + ClassBackgroundColor #E3E3E3 + ClassBorderColor black + PackageBorderColor black + PackageBackgroundColor #9FC6DE + ArrowColor #179c7d + NoteBackgroundColor transparent + NoteBorderColor black + } + rectangle "OSP-core" as OSP { abstract class Session { } From 4f599f8759377ee2270cf3803b4f3934d2c0f44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Dom=C3=ADnguez?= <43052541+kysrpex@users.noreply.github.com> Date: Thu, 2 Sep 2021 09:45:16 +0200 Subject: [PATCH 06/15] The `format` keyword becomes optional for OWL ontologies with OSP-core PR #699 (#181) The `format` keyword becomes optional for OWL ontologies with [OSP-core PR #699](https://github.com/simphony/osp-core/pull/699) --- docs/source/owl.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/source/owl.md b/docs/source/owl.md index 1dbe581..2311ae2 100644 --- a/docs/source/owl.md +++ b/docs/source/owl.md @@ -41,13 +41,16 @@ that contains multiple namespaces. Will be used for uninstallation: `pico uninst have executed a reasoner on your ontology, e.g. by using the `Export inferred axioms` functionality of [Protégé](https://protege.stanford.edu/). -**format**: File format of the ontology file to be parsed. We support all the +**format** (optional): File format of the ontology file to be parsed. We +support all the formats that [RDFLib](https://rdflib.readthedocs.io/en/stable/plugin_parsers.html) supports: XML (`xml`, `application/rdf+xml`, default), Turtle (`turtle`, `ttl`, `text/turtle`), N3 (`n3`,`text/n3`), NTriples (`nt`, `nt11`, `application/n-triples`), N-Quads (`nquads`, `application/n-quads`), -TriX (`trix`, `application/trix`) and TriG (`trig`, `application/trig`). +TriX (`trix`, `application/trix`) and TriG (`trig`, `application/trig`). +When not provided, it will be guessed from the file extension. However, such +guess may not always be correct. **reference_by_label** (default False): Whether the label should be used or the IRI suffix to reference entity from within OSP-core. In case of EMMO it is true, because IRI suffixes are not From b24a3795122778edb6ff175866877fbd780a7cbe Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Tue, 21 Sep 2021 10:21:42 +0200 Subject: [PATCH 07/15] Clean up setup.py (#185) Remove unnecessary local python installation --- .dockerignore | 7 +------ .github/workflows/ci.yml | 2 +- .gitignore | 7 +------ local_build.Dockerfile | 4 ++-- packageinfo.py | 2 -- setup.py | 25 ------------------------- 6 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 packageinfo.py delete mode 100644 setup.py diff --git a/.dockerignore b/.dockerignore index b8167a8..608b1d4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,2 @@ .vscode/ -docs/build -*.pyc -build/ -dist/ -*.egg-info/ -.eggs/ \ No newline at end of file +build/ \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ad7a60..9114698 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,4 +24,4 @@ jobs: pip install wheel pip install -r requirements.txt - name: Build docs - run: python setup.py install + run: sphinx-build docs/source docs/build/html diff --git a/.gitignore b/.gitignore index b8167a8..608b1d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,2 @@ .vscode/ -docs/build -*.pyc -build/ -dist/ -*.egg-info/ -.eggs/ \ No newline at end of file +build/ \ No newline at end of file diff --git a/local_build.Dockerfile b/local_build.Dockerfile index baf0e63..3db995e 100644 --- a/local_build.Dockerfile +++ b/local_build.Dockerfile @@ -15,7 +15,7 @@ RUN pip install -r requirements.txt CMD sphinx-autobuild --host 0.0.0.0 docs/source docs/build/html # Build: -# $ docker build -f local_build.Dockerfile -t simphony-docs . +# docker build -f local_build.Dockerfile -t simphony-docs . # Run: -# $ docker run -it --rm -v $PWD:/app -p 8000:8000 simphony-docs +# docker run -it --rm -v $PWD:/app -p 8000:8000 simphony-docs diff --git a/packageinfo.py b/packageinfo.py deleted file mode 100644 index 74d1b4d..0000000 --- a/packageinfo.py +++ /dev/null @@ -1,2 +0,0 @@ -NAME = "simphony_docs" -VERSION = "2.4.3" diff --git a/setup.py b/setup.py deleted file mode 100644 index dc5168d..0000000 --- a/setup.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import subprocess -from setuptools import setup - -from packageinfo import VERSION, NAME - - -def generate_pdf(self): - path = os.path.join('docs', 'build', 'latex') - subprocess.check_call(["make", "-C", path]) - - -# Read description -with open('README.md', 'r') as readme: - README_TEXT = readme.read() - -# main setup configuration class -setup( - name=NAME, - version=VERSION, - author='Materials Data Science and Informatics Team at Fraunhofer IWM', - description='The SimPhoNy documentation', - keywords='simphony, documentation, sphinx, Fraunhofer IWM', - long_description=README_TEXT, -) From 1216f9bce8685d3fd3a30795626ec9604a3eb0c9 Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Tue, 21 Sep 2021 10:28:07 +0200 Subject: [PATCH 08/15] Update EMMO meaning (#187) Update what EMMO stands for --- docs/source/fundamentals.md | 2 +- docs/source/general_architecture.md | 2 +- docs/source/jupyter/ontology_interface.ipynb | 586 ++++++++++--------- docs/source/ontologies_included.md | 5 +- 4 files changed, 299 insertions(+), 296 deletions(-) diff --git a/docs/source/fundamentals.md b/docs/source/fundamentals.md index 32001c3..3681e01 100644 --- a/docs/source/fundamentals.md +++ b/docs/source/fundamentals.md @@ -150,7 +150,7 @@ Ontologies are more elaborated than taxonomies in that they can include multiple (not just parent-child) between complex concepts in big domains. #### EMMO -The European Materials Modelling Ontology ([EMMO](https://github.com/emmo-repo/EMMO)) is an ontology developed by the European Materials Modelling Council ([EMMC](https://emmc.info/)). +The Elementary Multiperspective Material Ontology ([EMMO](https://github.com/emmo-repo/EMMO), previously the European Materials Modelling Ontology) is an ontology developed by the European Materials Modelling Council ([EMMC](https://emmc.info/)). EMMO's goal is to define a representational system universal for scientists in the field of materials modelling to enable interoperability. It has been designed from the bottom up, starting with the concepts of different domains and application fields diff --git a/docs/source/general_architecture.md b/docs/source/general_architecture.md index 5bab24d..ee019b7 100644 --- a/docs/source/general_architecture.md +++ b/docs/source/general_architecture.md @@ -214,7 +214,7 @@ or [one of the supported owl ontologies](owl.md). ``` -OSP-core can be used with EMMO (European Materials and Modelling Ontology) out of the box. +OSP-core can be used with EMMO (Elementary Multiperspective Material Ontology) out of the box. See more [here](ontologies_included.md). ### Python classes diff --git a/docs/source/jupyter/ontology_interface.ipynb b/docs/source/jupyter/ontology_interface.ipynb index 8344f62..774ab49 100644 --- a/docs/source/jupyter/ontology_interface.ipynb +++ b/docs/source/jupyter/ontology_interface.ipynb @@ -2,7 +2,6 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, "source": [ "# Tutorial: Ontology interface\n", "\n", @@ -14,43 +13,46 @@ "\n", "\n", "This tutorial introduces the interface to the installed ontologies. The code presented is based on [this example](https://github.com/simphony/osp-core/blob/master/examples/ontology_example.py)." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Background" - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "In an ontological framework, ontology entities are used as a knowledge representation form. Those can be further categorized in two groups: ontology individuals ([assertional knowledge](https://en.wikipedia.org/wiki/Abox)), and ontology classes, relationships and attributes ([terminological knowledge](https://en.wikipedia.org/wiki/Tbox)).\n", "\n", "In a [previous tutorial](./cuds-api.html), we have discussed how to work with CUDS objects, which represent ontology individuals. In this tutorial, we present the API of all the other entities instead: ontology classes, relationships and attributes. These are defined in an ontology installation file in [YAML](../yaml.md) or [OWL](../owl.md) format. The presented API enables you to access the entities and navigate within an ontology." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ - "In this tutorial, we will work both with the `city` namespace, the example namespace from OSP-core, and the `math` namespace from the [European Materials & Modelling Ontology (EMMO) ontology](https://github.com/emmo-repo/EMMO), for which an installation file is also provided with OSP-core.\n", + "In this tutorial, we will work both with the `city` namespace, the example namespace from OSP-core, and the `math` namespace from the [Elementary Multiperspective Material Ontology (EMMO)](https://github.com/emmo-repo/EMMO), for which an installation file is also provided with OSP-core.\n", "\n", "Please install the ontologies running the commands below if you have not installed them yet." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 1, - "metadata": { - "tags": [] - }, + "source": [ + "# Install the ontologies\n", + "!pico install city\n", + "!pico install emmo" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "INFO 2021-03-31 16:16:53,174 [osp.core.ontology.installation]: Will install the following namespaces: ['city']\n", "INFO 2021-03-31 16:16:53,187 [osp.core.ontology.yml.yml_parser]: Parsing YAML ontology file /home/jose/.local/lib/python3.9/site-packages/osp/core/ontology/docs/city.ontology.yml\n", @@ -82,15 +84,12 @@ ] } ], - "source": [ - "# Install the ontologies\n", - "!pico install city\n", - "!pico install emmo" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Accessing entities: the namespace object\n", "\n", @@ -107,18 +106,19 @@ "```\n", "\n", "Alternatively, you can use [pico ontology installation tool](https://simphony.readthedocs.io/en/latest/utils.html#pico-installs-cuds-ontologies) to see the installed namespaces:" - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "tags": [] - }, + "source": [ + "!pico list" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "Packages:\n", "\t- city\n", @@ -152,32 +152,31 @@ ] } ], - "source": [ - "!pico list" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "Once we know the name of the namespace that we want to use, we import it in python. For this tutorial, we are importing the namespaces `city` and `math`. Through those imported namespace python objects, the entities within the namespaces can be accessed:" - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 3, - "metadata": { - "tags": [] - }, - "outputs": [], "source": [ "from osp.core.namespaces import city\n", "from osp.core.namespaces import math" - ] + ], + "outputs": [], + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "There are several ways to access an ontology entity in OSP-core, which are summarized by the following list and will be demonstrated shortly after.\n", "\n", @@ -188,29 +187,29 @@ "- By **IRI**. The full [IRI](https://fusion.cs.uni-jena.de/fusion/blog/2016/11/18/iri-uri-url-urn-and-their-differences/) of an ontology entity is provided in order to fetch it.\n", "\n", "- By **string**. Using a string, for example `\"city.LivingBeing\"`. This is only useful in some special cases." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "The **most convenient way** to access an ontology entity is using the **dot notation** in python. For example, `city.Citizen`. This method is a shorthand for fetching by suffix or label: \n", "\n", "- When the keyword `reference_by_label` is set to `True` (enabled) in the [ontology YAML installation file](../owl.md), the dot notation is a shorthand for fetching by label. This keyword is **enabled** in the `math` namespace.\n", "\n", "- When the keyword `reference_by_label` is set to `False` (disabled) or not set, the dot notation is a shorthand for fetching by suffix instead. This keyword is **disabled** in the `city` namespace." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "To get a list of all the entities available within a namespace, run `list(namespace)`." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "
\n", "
\n", @@ -221,226 +220,231 @@ "
\n", "
\n", "" - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "**Accessing an ontology entity by suffix**\n", "\n", "Let's fetch the Citizen class, whose IRI is `http://www.osp-core.com/city#Citizen`." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "The keyword, `reference_by_label` is set to `False`, so one can just use the dot notation. " - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "source": [ + "city.Citizen" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "" ] }, - "execution_count": 4, "metadata": {}, - "output_type": "execute_result" + "execution_count": 4 } ], - "source": [ - "city.Citizen" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "Another alternative is using the `get_from_suffix` method from the namespace object. This is useful when the suffix contains characters that Python does not accept as property names, such as spaces or dashes." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "source": [ + "city.get_from_suffix('Citizen')" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "" ] }, - "execution_count": 5, "metadata": {}, - "output_type": "execute_result" + "execution_count": 5 } ], - "source": [ - "city.get_from_suffix('Citizen')" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "Note that the suffix is case sensitive, and therefore the following would produce an error." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 6, - "metadata": {}, - "outputs": [], "source": [ "#city.citizen # -> Fails." - ] + ], + "outputs": [], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "**Accessing an ontology entity by label**\n", "\n", "Let's fetch the Integer class, whose IRI is `http://emmo.info/emmo/middle/math#EMMO_f8bd64d5_5d3e_4ad4_a46e_c30714fecb7f`." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "The keyword `reference_by_label` is set to `True`, so we just use the dot notation." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "source": [ + "math.Integer" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "" ] }, - "execution_count": 7, "metadata": {}, - "output_type": "execute_result" + "execution_count": 7 } ], - "source": [ - "math.Integer" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "Another alternative is using the square bracket notation on the namespace object. This is useful when the suffix contains characters that Python does not accept as property names, such as spaces or dashes." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 8, - "metadata": {}, + "source": [ + "math['Integer']" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "" ] }, - "execution_count": 8, "metadata": {}, - "output_type": "execute_result" + "execution_count": 8 } ], - "source": [ - "math['Integer']" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "Fetching by label is NOT case sensitive when using the dot notation, but it is when using square brackets, so the following behavior is expected." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "source": [ + "#math['integer'] # -> Fails.\n", + "math.integer # -> Works." + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "" ] }, - "execution_count": 9, "metadata": {}, - "output_type": "execute_result" + "execution_count": 9 } ], - "source": [ - "#math['integer'] # -> Fails.\n", - "math.integer # -> Works." - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "**Accessing an ontology entity by IRI**\n", "\n", "This is only possible using the `get_from_iri` method from the namespace object. For example, let's fetch the Integer entity again." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 10, - "metadata": {}, + "source": [ + "math.get_from_iri('http://emmo.info/emmo/middle/math#EMMO_f8bd64d5_5d3e_4ad4_a46e_c30714fecb7f')" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "" ] }, - "execution_count": 10, "metadata": {}, - "output_type": "execute_result" + "execution_count": 10 } ], - "source": [ - "math.get_from_iri('http://emmo.info/emmo/middle/math#EMMO_f8bd64d5_5d3e_4ad4_a46e_c30714fecb7f')" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "**Access entities using a string**\n", "\n", "Sometimes you only have a string refering to an entity. Using the `get_entity` function you can get the corresponding python object easily:" - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 11, - "metadata": { - "tags": [] - }, + "source": [ + "from osp.core.namespaces import get_entity # noqa: E402\n", + "\n", + "print(\"\\nYou can get an entity with a string\")\n", + "print(get_entity(\"city.LivingBeing\"))\n", + "print(get_entity(\"city.LivingBeing\") == city.LivingBeing)" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "\n", "You can get an entity with a string\n", @@ -449,123 +453,132 @@ ] } ], - "source": [ - "from osp.core.namespaces import get_entity # noqa: E402\n", - "\n", - "print(\"\\nYou can get an entity with a string\")\n", - "print(get_entity(\"city.LivingBeing\"))\n", - "print(get_entity(\"city.LivingBeing\") == city.LivingBeing)" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Accessing an entity's name, IRI and namespace" - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "Each ontology entity has an associated name which can be accessed using the `name` property. " - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 12, - "metadata": { - "tags": [] - }, + "source": [ + "city.LivingBeing.name" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "'LivingBeing'" ] }, - "execution_count": 12, "metadata": {}, - "output_type": "execute_result" + "execution_count": 12 } ], - "source": [ - "city.LivingBeing.name" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "The IRI of an entity might be accessed using the `iri` property." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 13, - "metadata": {}, + "source": [ + "math.Real.iri" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "rdflib.term.URIRef('http://emmo.info/emmo/middle/math#EMMO_18d180e4_5e3e_42f7_820c_e08951223486')" ] }, - "execution_count": 13, "metadata": {}, - "output_type": "execute_result" + "execution_count": 13 } ], - "source": [ - "math.Real.iri" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "In addition, it is possible to get the namespace object to which the entity belongs using the `namespace` property." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 14, - "metadata": {}, + "source": [ + "math.Equation.namespace" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "" ] }, - "execution_count": 14, "metadata": {}, - "output_type": "execute_result" + "execution_count": 14 } ], - "source": [ - "math.Equation.namespace" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Accessing super- and subclasses\n", "\n", "Using the properties `superclasses` and `subclasses` it is easy to navigate the ontology. Direct superclasses and subclasses can also be accessed:" - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 15, - "metadata": { - "tags": [] - }, + "source": [ + "print(\"\\nYou can access the superclasses and the subclasses\")\n", + "print(city.LivingBeing.superclasses)\n", + "print(city.LivingBeing.subclasses)\n", + "\n", + "print(\"\\nYou can access the direct superclasses and subclasses\")\n", + "print(city.LivingBeing.direct_superclasses)\n", + "print(city.LivingBeing.direct_subclasses)\n", + "\n", + "print(\"\\nYou can access a description of the entities\")\n", + "print(city.LivingBeing.description)\n", + "\n", + "print(\"\\nYou can test if one entity is a subclass / superclass of another\")\n", + "print(city.Person.is_subclass_of(city.LivingBeing))\n", + "print(city.LivingBeing.is_superclass_of(city.Person))" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "\n", "You can access the superclasses and the subclasses\n", @@ -585,58 +598,22 @@ ] } ], - "source": [ - "print(\"\\nYou can access the superclasses and the subclasses\")\n", - "print(city.LivingBeing.superclasses)\n", - "print(city.LivingBeing.subclasses)\n", - "\n", - "print(\"\\nYou can access the direct superclasses and subclasses\")\n", - "print(city.LivingBeing.direct_superclasses)\n", - "print(city.LivingBeing.direct_subclasses)\n", - "\n", - "print(\"\\nYou can access a description of the entities\")\n", - "print(city.LivingBeing.description)\n", - "\n", - "print(\"\\nYou can test if one entity is a subclass / superclass of another\")\n", - "print(city.Person.is_subclass_of(city.LivingBeing))\n", - "print(city.LivingBeing.is_superclass_of(city.Person))" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Testing the type of the entities\n", "\n", "In the ontology, three types of entities can be defined: classes, relationships and attributes. OSP-core has its own vocabulary, the [CUBA namespace](../yaml.html#the-cuba-namespace), which describes, among other things, such entity types. Relationships are subclasses of `CUBA.RELATIONSHIP` and attributes are subclasses of `CUBA.ATTRIBUTE`. There are different Python objects for the different entity types. You can use both to check which type of entity you are dealing with:" - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 16, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "You can test if an entity is a class\n", - "True\n", - "True\n", - "\n", - "You can test if an entity is a relationship\n", - "True\n", - "True\n", - "\n", - "You can test if an entity is a attribute\n", - "True\n", - "True\n" - ] - } - ], "source": [ "from osp.core.namespaces import cuba # noqa: E402\n", "\n", @@ -661,27 +638,55 @@ "print(isinstance(city.name, OntologyAttribute))\n", "print(city.name.is_subclass_of(cuba.attribute))\n", "\n" - ] + ], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "You can test if an entity is a class\n", + "True\n", + "True\n", + "\n", + "You can test if an entity is a relationship\n", + "True\n", + "True\n", + "\n", + "You can test if an entity is a attribute\n", + "True\n", + "True\n" + ] + } + ], + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Operations specific to ontology classes\n", "\n", "The different types of entities differ in the operations they offer. For classes, you can access the attributes:" - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 17, - "metadata": { - "tags": [] - }, + "source": [ + "print(\"\\nYou can get the attributes of an ontology class and their defaults\")\n", + "print(city.Citizen.attributes)\n", + "\n", + "print(\"\\nYou can get the non-inherited attributes and their defaults\")\n", + "print(city.Citizen.own_attributes)\n", + "print(city.LivingBeing.own_attributes)" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "\n", "You can get the attributes of an ontology class and their defaults\n", @@ -693,66 +698,68 @@ ] } ], - "source": [ - "print(\"\\nYou can get the attributes of an ontology class and their defaults\")\n", - "print(city.Citizen.attributes)\n", - "\n", - "print(\"\\nYou can get the non-inherited attributes and their defaults\")\n", - "print(city.Citizen.own_attributes)\n", - "print(city.LivingBeing.own_attributes)" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "In addition, OSP-core has special support for the `owl:Restriction` and `owl:Composition` classes of the [Web Ontology Language (OWL)](https://en.wikipedia.org/wiki/Web_Ontology_Language) (check the [OWL ontology specification](https://www.w3.org/TR/owl2-syntax/) for more details). Such OWL classes are represented by the python classes `Restriction` and `Composition`. See [operations specific to ontology axioms](./ontology-interface.html#Operations-specific-to-ontology-axioms) for more information.\n", "\n", "For example, in the city ontology, the citizens have a restriction on the name and age attributes: a citizen must have exactly one name and one age. These axioms can be accessed using the `axioms` property, which returns both the restriction and compositions affecting the class." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 18, - "metadata": {}, + "source": [ + "tuple(str(x) for x in city.Citizen.axioms)" + ], "outputs": [ { + "output_type": "execute_result", "data": { "text/plain": [ "('city.name QUANTIFIER.EXACTLY 1', 'city.age QUANTIFIER.EXACTLY 1')" ] }, - "execution_count": 18, "metadata": {}, - "output_type": "execute_result" + "execution_count": 18 } ], - "source": [ - "tuple(str(x) for x in city.Citizen.axioms)" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Operations specific to ontology axioms" - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "For restrictions, the quantifier, the target, the restriction type and the relationship/attribute (depending on whether it is a restriction of the relationship type or attribute type) may be accessed." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 19, - "metadata": {}, + "source": [ + "restriction = city.Citizen.axioms[0]\n", + "print(restriction)\n", + "print(restriction.quantifier)\n", + "print(restriction.target)\n", + "print(restriction.rtype)\n", + "print(restriction.attribute)" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "city.name QUANTIFIER.EXACTLY 1\n", "QUANTIFIER.EXACTLY\n", @@ -762,30 +769,29 @@ ] } ], - "source": [ - "restriction = city.Citizen.axioms[0]\n", - "print(restriction)\n", - "print(restriction.quantifier)\n", - "print(restriction.target)\n", - "print(restriction.rtype)\n", - "print(restriction.attribute)" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "For compositions, both the operator and operands can be accesed." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 20, - "metadata": {}, + "source": [ + "from osp.core.ontology.oclass_composition import Composition\n", + "composition = tuple(x for x in math.Integer.axioms if type(x) is Composition)[0]\n", + "print(composition)\n", + "print(composition.operator)\n", + "print(composition.operands)" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "(math.Mathematical OPERATOR.AND perceptual.Symbol)\n", "OPERATOR.AND\n", @@ -793,33 +799,28 @@ ] } ], - "source": [ - "from osp.core.ontology.oclass_composition import Composition\n", - "composition = tuple(x for x in math.Integer.axioms if type(x) is Composition)[0]\n", - "print(composition)\n", - "print(composition.operator)\n", - "print(composition.operands)" - ] + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Operations specific to ontology relationships\n", "\n", "You can access the inverse of relationships." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 21, - "metadata": { - "tags": [] - }, + "source": [ + "print(\"\\nYou can get the inverse of a relationship\")\n", + "print(city.hasInhabitant.inverse)" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "\n", "You can get the inverse of a relationship\n", @@ -827,30 +828,44 @@ ] } ], - "source": [ - "print(\"\\nYou can get the inverse of a relationship\")\n", - "print(city.hasInhabitant.inverse)" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Operations specific to attributes\n", "\n", "You can acces the datatype and the argument name of attributes." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 22, - "metadata": { - "tags": [] - }, + "source": [ + "print(\"\\nYou can get the argument name of an attribute. \"\n", + " \"The argument name is used as keyword argument when instantiating CUDS objects.\")\n", + "print(city.age.argname)\n", + "\n", + "print(\"\\nYou can get the datatype of attributes\")\n", + "print(city.age.datatype)\n", + "\n", + "print(\"\\nYou can use the attribute to convert values \"\n", + " \"to the datatype of the attribute\")\n", + "result = city.age.convert_to_datatype(\"10\")\n", + "print(type(result), result)\n", + "\n", + "print(\"\\nAnd likewise to convert values to the python basic type \"\n", + " \"associated with the datatype of the attribute.\")\n", + "result = city.name.convert_to_basic_type(5)\n", + "print(type(result), result)" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "\n", "You can get the argument name of an attribute. The argument name is used as keyword argument when instantiating CUDS objects.\n", @@ -867,51 +882,44 @@ ] } ], - "source": [ - "print(\"\\nYou can get the argument name of an attribute. \"\n", - " \"The argument name is used as keyword argument when instantiating CUDS objects.\")\n", - "print(city.age.argname)\n", - "\n", - "print(\"\\nYou can get the datatype of attributes\")\n", - "print(city.age.datatype)\n", - "\n", - "print(\"\\nYou can use the attribute to convert values \"\n", - " \"to the datatype of the attribute\")\n", - "result = city.age.convert_to_datatype(\"10\")\n", - "print(type(result), result)\n", - "\n", - "print(\"\\nAnd likewise to convert values to the python basic type \"\n", - " \"associated with the datatype of the attribute.\")\n", - "result = city.name.convert_to_basic_type(5)\n", - "print(type(result), result)" - ] + "metadata": { + "tags": [] + } }, { "cell_type": "markdown", - "metadata": {}, "source": [ "Check the API Reference for more details on the methods [_convert_to_datatype_](http://127.0.0.1:8000/api_ref.html#osp.core.ontology.attribute.OntologyAttribute.convert_to_datatype) and [_convert_to_basic_type_](http://127.0.0.1:8000/api_ref.html#osp.core.ontology.attribute.OntologyAttribute.convert_to_basic_type)." - ] + ], + "metadata": {} }, { "cell_type": "markdown", - "metadata": {}, "source": [ "## Creating CUDS using ontology classes\n", "\n", "You can call ontology classes to create CUDS objects. To learn more, have a look at the [CUDS API tutorial](./cuds-api.html)." - ] + ], + "metadata": {} }, { "cell_type": "code", "execution_count": 23, - "metadata": { - "tags": [] - }, + "source": [ + "print(\"\\nYou can instantiate CUDS objects using ontology classes\")\n", + "print(city.Citizen(name=\"Test Person\", age=42))\n", + "\n", + "print(\"\\nYou can check if a CUDS object is an instance of a ontology class\")\n", + "print(city.Citizen(name=\"Test Person\", age=42).is_a(city.Citizen))\n", + "print(city.Citizen(name=\"Test Person\", age=42).is_a(city.LivingBeing))\n", + "\n", + "print(\"\\nYou can get the ontology class of a CUDS object.\")\n", + "print(city.Citizen(name=\"Test Person\", age=42).oclass)\n" + ], "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "\n", "You can instantiate CUDS objects using ontology classes\n", @@ -926,20 +934,16 @@ ] } ], - "source": [ - "print(\"\\nYou can instantiate CUDS objects using ontology classes\")\n", - "print(city.Citizen(name=\"Test Person\", age=42))\n", - "\n", - "print(\"\\nYou can check if a CUDS object is an instance of a ontology class\")\n", - "print(city.Citizen(name=\"Test Person\", age=42).is_a(city.Citizen))\n", - "print(city.Citizen(name=\"Test Person\", age=42).is_a(city.LivingBeing))\n", - "\n", - "print(\"\\nYou can get the ontology class of a CUDS object.\")\n", - "print(city.Citizen(name=\"Test Person\", age=42).oclass)\n" - ] + "metadata": { + "tags": [] + } } ], - "metadata": {}, + "metadata": { + "language_info": { + "name": "python" + } + }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file diff --git a/docs/source/ontologies_included.md b/docs/source/ontologies_included.md index a9d337d..3916e6a 100644 --- a/docs/source/ontologies_included.md +++ b/docs/source/ontologies_included.md @@ -23,9 +23,8 @@ Take a look at our [examples](jupyter/cuds-api.md) to see how you can build your ## Working with EMMO -The second ontology that is ready to be used out of the box is the European -Materials Modelling Ontology, or EMMO in short. -For a short introduction, see the [fundamentals](./fundamentals.md#emmo). +The second ontology that is ready to be used out of the box is the Elementary Multiperspective Material Ontology, +or EMMO in short. For a short introduction, see the [fundamentals](./fundamentals.md#emmo). You can install EMMO using [Pico](utils.md#pico-installs-cuds-ontologies). From b7fb4eb0b0fe0e4b8d11d51bb4b93b6f3abc89e0 Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Tue, 21 Sep 2021 10:30:11 +0200 Subject: [PATCH 09/15] Replace Recommonmark by MyST (#186) Updates the configuration, admonitions, plantUML directives, panels, toctree... --- docs/source/api_ref.md | 12 +- docs/source/conf.py | 17 +- docs/source/contribute.md | 3 +- docs/source/detailed_design.md | 665 ++++++++++++++-------------- docs/source/fundamentals.md | 20 +- docs/source/general_architecture.md | 6 +- docs/source/index.md | 144 +++--- docs/source/links.md | 4 +- docs/source/utils.md | 3 +- docs/source/wrapper_development.md | 3 +- docs/source/yaml.md | 6 +- local_build.Dockerfile | 2 +- requirements.txt | 2 +- 13 files changed, 424 insertions(+), 463 deletions(-) diff --git a/docs/source/api_ref.md b/docs/source/api_ref.md index c5c69e8..4c0f6b0 100644 --- a/docs/source/api_ref.md +++ b/docs/source/api_ref.md @@ -1,4 +1,4 @@ -```eval_rst +```{eval-rst} .. raw:: html

API Reference

@@ -7,14 +7,14 @@ This document is for developers and/or advanced users of OSP-core, it contains all API details. ## CUDS -```eval_rst +```{eval-rst} .. autoclass:: osp.core.cuds.Cuds :members: :show-inheritance: ``` ## Ontology interface -```eval_rst +```{eval-rst} .. autoclass:: osp.core.ontology.namespace.OntologyNamespace :members: :special-members: __getattr__, __getitem__, __contains__, __iter__, __eq__ @@ -46,7 +46,7 @@ This document is for developers and/or advanced users of OSP-core, it contains a ``` ## Sessions -```eval_rst +```{eval-rst} .. autoclass:: osp.core.session.session.Session :members: :show-inheritance: @@ -73,14 +73,14 @@ This document is for developers and/or advanced users of OSP-core, it contains a ``` ## Registry -```eval_rst +```{eval-rst} .. autoclass:: osp.core.session.registry.Registry :members: :show-inheritance: ``` ## Utilities -```eval_rst +```{eval-rst} .. automodule:: osp.core.utils :imported-members: :members: diff --git a/docs/source/conf.py b/docs/source/conf.py index 2bbab9b..2845650 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,7 +7,6 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) -from recommonmark.transform import AutoStructify # -- Project information ----------------------------------------------------- project = 'SimPhoNy' @@ -18,7 +17,7 @@ # -- General configuration --------------------------------------------------- extensions = [ - 'recommonmark', # markdown source support + 'myst_parser', # markdown source support 'sphinx.ext.autodoc', # API ref 'sphinx.ext.napoleon', # API ref Google and NumPy style 'sphinx.ext.viewcode', # API link to source @@ -60,18 +59,4 @@ latex_logo = '_static/img/simphony_logo_dark.png' latex_elements = {'figure_align': 'H'} - -def setup(app): - # Configuration for recommonmark - app.add_config_value('recommonmark_config', { - # 'auto_toc_tree_section': 'Contents', - # 'enable_math': False, - # 'enable_inline_math': False, - 'auto_toc_maxdepth': 2, - 'enable_eval_rst': True, - # 'enable_auto_doc_ref': True, - }, True) - app.add_transform(AutoStructify) - - nbsphinx_allow_errors = True diff --git a/docs/source/contribute.md b/docs/source/contribute.md index 362ce7e..65aaf91 100644 --- a/docs/source/contribute.md +++ b/docs/source/contribute.md @@ -42,8 +42,7 @@ All wrappers and OSP-core are part of a common directory structure: An owner of the project should be tagged for review. They will review and merge the PR if the fix is correct, deleting the `issue branch` afterwards. The changes should be clearly explained in the issue/Pull Request. -```eval_rst -.. warning:: +```{warning} If the issue is a critical software bug detected in the stable release, a :code:`hotfix branch` should be created from the :code:`master/main` branch instead. diff --git a/docs/source/detailed_design.md b/docs/source/detailed_design.md index 14360fa..24b17ea 100644 --- a/docs/source/detailed_design.md +++ b/docs/source/detailed_design.md @@ -3,143 +3,141 @@ Here we will give an in-depth view of the design of the 3 layers. For a more general overview, go to [getting started](./getting_started.md#general-architecture). +```{uml} + :caption: Standard design + :align: center -```eval_rst -.. uml:: - :caption: Standard design - :align: center + skinparam { + Shadowing false + BackgroundColor transparent + ClassBackgroundColor #E3E3E3 + ClassBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + InterfaceBackgroundColor transparent + InterfaceBorderColor #179c7d + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + PackageBorderColor black + PackageBackgroundColor #9FC6DE + ArrowColor #179c7d + } - skinparam { - Shadowing false - BackgroundColor transparent - ClassBackgroundColor #E3E3E3 - ClassBorderColor black - ActorBackgroundColor transparent - ActorBorderColor #179c7d - InterfaceBackgroundColor transparent - InterfaceBorderColor #179c7d - DatabaseBackgroundColor transparent - DatabaseBorderColor #179c7d - PackageBorderColor black - PackageBackgroundColor #9FC6DE - ArrowColor #179c7d + allow_mixing + actor User + + circle pico + + rectangle SemanticLayer { + class Cuds { + Session session + UUID uuid + OntologyEntity oclass + -- + add() : Cuds + get() : Cuds + remove() : void + update() : void + iter() : Iterator } - allow_mixing - actor User - - circle pico - - rectangle SemanticLayer { - class Cuds { - Session session - UUID uuid - OntologyEntity oclass - -- - add() : Cuds - get() : Cuds - remove() : void - update() : void - iter() : Iterator - } - - abstract class OntologyEntity { - String name - URIRef iri - String tblname - OntologyNamespace namespace - Set direct_superclasses - Set direct_subclasses - Set superclasses - Set subclasses - String description - -- - get_triples() : triple - is_superclass_of() : bool - is_subclass_of() : bool - } - class OntologyClass implements OntologyEntity { - Dict attributes - Dict own_attributes - } - - class OntologyRelationship implements OntologyEntity { - OntologyRelationship inverse - } - - class OntologyAttribute implements OntologyEntity { - URIRef datatype - -- - convert_to_datatype() : Any - convert_to_basic_type() : Any - } - - class OntologyNamespace { - -- - get_iri() : URIRef - get_default_rel() : OntologyRelationship - get() : OntologyEntity - - } - - class NamespaceRegistry { - -- - get() : OntologyNamespace - update_namespaces() : void - from_iri() : OntologyEntity - clear() : Graph - store() : void - load() : void - } + abstract class OntologyEntity { + String name + URIRef iri + String tblname + OntologyNamespace namespace + Set direct_superclasses + Set direct_subclasses + Set superclasses + Set subclasses + String description + -- + get_triples() : triple + is_superclass_of() : bool + is_subclass_of() : bool + } + class OntologyClass implements OntologyEntity { + Dict attributes + Dict own_attributes } - rectangle InteroperabilityLayer { - class Registry { - } - - abstract class Session { - Registry : registry - -- - store() : void - load() : Cuds - sync() : void - } - - class SomeWrapperSession implements Session { - List added - List updated - List removed - SyntacticLayer syntactic - -- - } + class OntologyRelationship implements OntologyEntity { + OntologyRelationship inverse } - rectangle SyntacticLayer { - class SyntacticLayer { - } + class OntologyAttribute implements OntologyEntity { + URIRef datatype + -- + convert_to_datatype() : Any + convert_to_basic_type() : Any } - database backend + class OntologyNamespace { + -- + get_iri() : URIRef + get_default_rel() : OntologyRelationship + get() : OntologyEntity - ' ----------------------- - ' ------ RELATIONS ------ - ' ----------------------- - User -up-> OntologyClass : interacts_with - Cuds -left> OntologyClass : instance_of - OntologyEntity -> OntologyNamespace : part_of - OntologyNamespace -> NamespaceRegistry : contained_in - OntologyClass -left> OntologyAttribute : has + } - pico -> NamespaceRegistry : manages + class NamespaceRegistry { + -- + get() : OntologyNamespace + update_namespaces() : void + from_iri() : OntologyEntity + clear() : Graph + store() : void + load() : void + } + } - Cuds -> Session : has_a - Session -> Registry : manages + rectangle InteroperabilityLayer { + class Registry { + } - SomeWrapperSession -> SyntacticLayer : manages + abstract class Session { + Registry : registry + -- + store() : void + load() : Cuds + sync() : void + } + + class SomeWrapperSession implements Session { + List added + List updated + List removed + SyntacticLayer syntactic + -- + } + } + + rectangle SyntacticLayer { + class SyntacticLayer { + } + } + + database backend + + ' ----------------------- + ' ------ RELATIONS ------ + ' ----------------------- + User -up-> OntologyClass : interacts_with + Cuds -left> OntologyClass : instance_of + OntologyEntity -> OntologyNamespace : part_of + OntologyNamespace -> NamespaceRegistry : contained_in + OntologyClass -left> OntologyAttribute : has + + pico -> NamespaceRegistry : manages - SyntacticLayer -> backend : acts_on + Cuds -> Session : has_a + Session -> Registry : manages - OntologyRelationship -[hidden]> OntologyAttribute + SomeWrapperSession -> SyntacticLayer : manages + + SyntacticLayer -> backend : acts_on + + OntologyRelationship -[hidden]> OntologyAttribute ``` ## Semantic layer @@ -184,8 +182,7 @@ The actual related objects are kept in the [registry](#registry). } ``` -```eval_rst -.. note:: +```{note} This is an abstraction to show the general structure. The actual implementation is a bit more complex. ``` @@ -200,9 +197,7 @@ This CRUD API is defined by 6 methods: from osp.core.namespaces import some_namespace ontology_class = some_namespace.OntologyClass - relationship = some_namespace.relationship - cuds_obj = some_namespace.OntologyClass() ``` @@ -210,48 +205,47 @@ cuds_obj = some_namespace.OntologyClass() ```python # These will also add the opposed relationship to the new contained cuds object cuds_obj.add(*other_cuds, rel=relationship) - cuds_obj.add(yet_another_cuds) # Uses default relationship from ontology + cuds_obj.add(yet_another_cuds) # Uses default relationship from ontology ``` The flow of information for the call of the `add` method would be: - ```eval_rst - .. uml:: - :caption: `add` method call - :align: center - - skinparam { - Shadowing false - BackgroundColor transparent - sequenceBoxBackgroundColor #9FC6DE - sequenceBoxBorderColor black - ActorBackgroundColor transparent - ActorBorderColor #179c7d - ParticipantBackgroundColor #E3E3E3 - ParticipantBorderColor black - DatabaseBackgroundColor transparent - DatabaseBorderColor #179c7d - SequenceLifeLineBorderColor #179c7d - ArrowColor #179c7d - } - - actor user - box "Semantic Layer" - participant "cuds" as cuds - end box - - box "Interoperability Layer" - participant "session" as sess - end box - - box "Syntactic Layer" - participant "engine" as eng - end box - - database "backend" as back - - user -> cuds: add - cuds <- sess: load - cuds -> sess: store + ```{uml} + :caption: add method call + :align: center + + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + + actor user + box "Semantic Layer" + participant "cuds" as cuds + end box + + box "Interoperability Layer" + participant "session" as sess + end box + + box "Syntactic Layer" + participant "engine" as eng + end box + + database "backend" as back + + user -> cuds: add + cuds <- sess: load + cuds -> sess: store ``` As you can see, the information is sent to the next layer, but not all the way to the backend. This will be propagated when the user calls `session.run()` or `session.commit`. @@ -269,53 +263,53 @@ cuds_obj = some_namespace.OntologyClass() cuds_obj.get(rel=relationship, oclass=ontology_class) # Filters by rel and oclass ``` In this case, the calls carried out by the `get` method are as follows: - ```eval_rst - .. uml:: - :caption: `get` method call - :align: center - - skinparam { - Shadowing false - BackgroundColor transparent - sequenceBoxBackgroundColor #9FC6DE - sequenceBoxBorderColor black - ActorBackgroundColor transparent - ActorBorderColor #179c7d - ParticipantBackgroundColor #E3E3E3 - ParticipantBorderColor black - DatabaseBackgroundColor transparent - DatabaseBorderColor #179c7d - SequenceLifeLineBorderColor #179c7d - ArrowColor #179c7d - } - - actor user - box "Semantic Layer" - participant "cuds" as cuds - end box - - box "Interoperability Layer" - participant "session" as sess - end box - - box "Syntactic Layer" - participant "engine" as eng - end box - - database "backend" as back - - user -> cuds: get - cuds -> sess: load - - == Object not in registry == - sess -> eng: _load_from_backend - eng -> back: - back --> eng: - eng --> sess: - == Object in registry == - sess --> cuds: object - cuds --> user: object - ``` + + ```{uml} + :caption: get method call + :align: center + + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + + actor user + box "Semantic Layer" + participant "cuds" as cuds + end box + + box "Interoperability Layer" + participant "session" as sess + end box + + box "Syntactic Layer" + participant "engine" as eng + end box + + database "backend" as back + + user -> cuds: get + cuds -> sess: load + + == Object not in registry == + sess -> eng: _load_from_backend + eng -> back: + back --> eng: + eng --> sess: + == Object in registry == + sess --> cuds: object + cuds --> user: object + ``` Now the backend is contacted to make sure the user receives the latest available version of the objects being queried. This is done through `_load_from_backend()`. @@ -327,45 +321,44 @@ cuds_obj = some_namespace.OntologyClass() ``` A simple `update` call triggers the following behaviour: - ```eval_rst - .. uml:: - :caption: `update` method call - :align: center - - skinparam { - Shadowing false - BackgroundColor transparent - sequenceBoxBackgroundColor #9FC6DE - sequenceBoxBorderColor black - ActorBackgroundColor transparent - ActorBorderColor #179c7d - ParticipantBackgroundColor #E3E3E3 - ParticipantBorderColor black - DatabaseBackgroundColor transparent - DatabaseBorderColor #179c7d - SequenceLifeLineBorderColor #179c7d - ArrowColor #179c7d - } - - actor user - box "Semantic Layer" - participant "cuds" as cuds - end box - - box "Interoperability Layer" - participant "session" as sess - end box - - box "Syntactic Layer" - participant "engine" as eng - end box - - database "backend" as back - - user -> cuds: update - cuds <- sess: load() - cuds -> sess: store() - ``` + ```{uml} + :caption: update method call + :align: center + + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + + actor user + box "Semantic Layer" + participant "cuds" as cuds + end box + + box "Interoperability Layer" + participant "session" as sess + end box + + box "Syntactic Layer" + participant "engine" as eng + end box + + database "backend" as back + + user -> cuds: update + cuds <- sess: load() + cuds -> sess: store() + ``` You can see the calls are very much the same as with the `add` method. The difference is that the `update` requires the object to be there previously. And so the object is first loaded from the registry, then updated and stored. @@ -383,45 +376,44 @@ cuds_obj = some_namespace.OntologyClass() ``` The sequence for a simple `remove` is: - ```eval_rst - .. uml:: - :caption: `remove` method call - :align: center - - skinparam { - Shadowing false - BackgroundColor transparent - sequenceBoxBackgroundColor #9FC6DE - sequenceBoxBorderColor black - ActorBackgroundColor transparent - ActorBorderColor #179c7d - ParticipantBackgroundColor #E3E3E3 - ParticipantBorderColor black - DatabaseBackgroundColor transparent - DatabaseBorderColor #179c7d - SequenceLifeLineBorderColor #179c7d - ArrowColor #179c7d - } - - actor user - box "Semantic Layer" - participant "cuds" as cuds - end box - - box "Interoperability Layer" - participant "session" as sess - end box - - box "Syntactic Layer" - participant "engine" as eng - end box - - database "backend" as back - - user -> cuds: remove - cuds <- sess: load() - cuds -> cuds: remove_rel() - ``` + ```{uml} + :caption: remove method call + :align: center + + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + + actor user + box "Semantic Layer" + participant "cuds" as cuds + end box + + box "Interoperability Layer" + participant "session" as sess + end box + + box "Syntactic Layer" + participant "engine" as eng + end box + + database "backend" as back + + user -> cuds: remove + cuds <- sess: load() + cuds -> cuds: remove_rel() + ``` Here the registry is accessed to fetch the neighbours of the removed object and delete their links (relationships) to it. @@ -434,55 +426,52 @@ cuds_obj = some_namespace.OntologyClass() ``` The general behaviour of the `iter` is: - ```eval_rst - .. uml:: - :caption: `iter` method call - :align: center - - skinparam { - Shadowing false - BackgroundColor transparent - sequenceBoxBackgroundColor #9FC6DE - sequenceBoxBorderColor black - ActorBackgroundColor transparent - ActorBorderColor #179c7d - ParticipantBackgroundColor #E3E3E3 - ParticipantBorderColor black - DatabaseBackgroundColor transparent - DatabaseBorderColor #179c7d - SequenceLifeLineBorderColor #179c7d - ArrowColor #179c7d - } - - actor user - box "Semantic Layer" - participant "cuds" as cuds - end box - - box "Interoperability Layer" - participant "session" as sess - end box - - box "Syntactic Layer" - participant "engine" as eng - end box - - database "backend" as back - - user -> cuds: iterate - cuds <- sess: load() - cuds -> user: yield(object) - ``` + ```{uml} + :caption: iter method call + :align: center + + skinparam { + Shadowing false + BackgroundColor transparent + sequenceBoxBackgroundColor #9FC6DE + sequenceBoxBorderColor black + ActorBackgroundColor transparent + ActorBorderColor #179c7d + ParticipantBackgroundColor #E3E3E3 + ParticipantBorderColor black + DatabaseBackgroundColor transparent + DatabaseBorderColor #179c7d + SequenceLifeLineBorderColor #179c7d + ArrowColor #179c7d + } + + actor user + box "Semantic Layer" + participant "cuds" as cuds + end box + + box "Interoperability Layer" + participant "session" as sess + end box + + box "Syntactic Layer" + participant "engine" as eng + end box + + database "backend" as back + + user -> cuds: iterate + cuds <- sess: load() + cuds -> user: yield(object) + ``` First the uids of all the objects to be iterated are gathered, and then they are yielded like a generator -```eval_rst -.. hint:: +```{hint} There is also an :code:`is_a` method for checking oclass inheritance. ``` -```eval_rst -.. note:: +```{note} Be aware that the sequence diagrams shown represent simple use cases, and more complex scenarios are also possible (e.g. adding an object with children). ``` @@ -507,8 +496,7 @@ The backend is accessed via the Syntactic layer, through the `_engine` property. To simplify and group functionality, we built an inheritance scheme: -```eval_rst -.. uml:: + ```{uml} :caption: Session inheritance scheme :align: center @@ -622,11 +610,9 @@ To simplify and group functionality, we built an inheritance scheme: class SimlammpsSession implements SimWrapperSession { } } - @enduml -``` + ``` -```eval_rst -.. note:: +```{note} This is a reduced version and does not represent the entirety of the contained functions. ``` @@ -639,8 +625,7 @@ This will define which methods have to be implemented and `_engine` as the acces `SimWrapperSession` and `DbWrapperSession` further specify the behaviour of wrappers, defining the methods that trigger an action on the backend (`run` and `commit`, respectively). -```eval_rst -.. note:: +```{note} You might have noticed that the semantic layer defines :code:`remove` in the API, but in the session and registry we use :code:`delete`. The different between them is conceptual: :code:`remove` is interpreted as detachment i.e. removal of edges, diff --git a/docs/source/fundamentals.md b/docs/source/fundamentals.md index 3681e01..2d7951e 100644 --- a/docs/source/fundamentals.md +++ b/docs/source/fundamentals.md @@ -12,8 +12,7 @@ take care of the conversion on their own. Based on how tools communicate with other tools, we can define 3 levels: #### Compatibility - ```eval_rst - .. uml:: + ```{uml} :align: center :caption: Compatibility @@ -44,8 +43,7 @@ Based on how tools communicate with other tools, we can define 3 levels: However, `A` has no way to talk with `C` or `D`, for example. #### De Facto Standard - ```eval_rst - .. uml:: + ```{uml} :align: center :caption: De Facto Standard @@ -77,8 +75,7 @@ Based on how tools communicate with other tools, we can define 3 levels: and `A` will convert it to a format that `C` understands. #### Interoperability - ```eval_rst - .. uml:: + ```{uml} :align: center :caption: Interoperability @@ -128,11 +125,9 @@ Interoperability between software tools is one of the most important objectives is one of the principles of SimPhoNy. For achieving this goal, ontologies play a major role. ### Ontology -```eval_rst -.. important:: - An ontology is a formal specification of a shared conceptualization. `[Borst, 1997] - `_ . - +```{important} + An ontology is a formal specification of a shared conceptualization. + [[Borst, 1997]](https://research.utwente.nl/en/publications/construction-of-engineering-ontologies-for-knowledge-sharing-and-) ``` Let's look at the individual components of this definition, starting from the end. @@ -190,8 +185,7 @@ The graph is serialised in the form of triples of the form "subject-predicate-ob The following is an example of an RDF triple. This example will also be used to show the different serialisation formats of RDF. For the IRIs, `dbpedia`'s namespace was used. -```eval_rst -.. uml:: +```{uml} :align: center :caption: RDF triple sample diff --git a/docs/source/general_architecture.md b/docs/source/general_architecture.md index ee019b7..78c2dbb 100644 --- a/docs/source/general_architecture.md +++ b/docs/source/general_architecture.md @@ -1,8 +1,7 @@ # General architecture The following architecture has the aim to cover and support the goals presented in the [motivation section](./motivation.md). -```eval_rst -.. uml:: +```{uml} :align: center :caption: Interoperability concept @@ -57,8 +56,7 @@ that encompass all third party tools. For that, a 3 layer schema is used: -```eval_rst -.. uml:: +```{uml} :caption: Three layered design :align: center diff --git a/docs/source/index.md b/docs/source/index.md index 392fb97..8ec2b7d 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -2,9 +2,7 @@ SimPhoNy is an ontology-based [open-source](./license.md) Python framework that promotes and enables interoperability between any 3rd-party software tool. Here you can learn more about it. -```eval_rst - -.. panels:: +````{panels} :body: text-center --- @@ -12,7 +10,7 @@ SimPhoNy is an ontology-based [open-source](./license.md) Python framework that Overview, main concepts, and installation guide - .. link-button:: overview.html + ```{link-button} overview.html :text: To the getting started guides :classes: btn-outline-primary stretched-link @@ -21,7 +19,7 @@ SimPhoNy is an ontology-based [open-source](./license.md) Python framework that Core functionalities, wrappers and advanced utilities - .. link-button:: jupyter/cuds_api.ipynb + ```{link-button} jupyter/cuds_api.ipynb :text: To the usage guides :classes: btn-outline-primary stretched-link @@ -31,7 +29,7 @@ SimPhoNy is an ontology-based [open-source](./license.md) Python framework that Ontology overview, included ontologies, YAML ontologies and ontology querying - .. link-button:: ontology_intro.html + ```{link-button} ontology_intro.html :text: To the ontology guides :classes: btn-outline-primary stretched-link --- @@ -40,7 +38,7 @@ SimPhoNy is an ontology-based [open-source](./license.md) Python framework that A deep dive into the wrapper mechanism for developing new wrappers - .. link-button:: wrapper_development.html + ```{link-button} wrapper_development.html :text: To the wrapper development guides :classes: btn-outline-primary stretched-link --- @@ -49,7 +47,7 @@ SimPhoNy is an ontology-based [open-source](./license.md) Python framework that Python API of CUDS, the *Session* classes, and other utilities - .. link-button:: api_ref.html + ```{link-button} api_ref.html :text: To the API reference :classes: btn-outline-primary stretched-link @@ -58,69 +56,75 @@ SimPhoNy is an ontology-based [open-source](./license.md) Python framework that License, acknowledgements, data protection, contact info and more - .. link-button:: contribute.html + ```{link-button} contribute.html :text: To get more information :classes: btn-outline-primary stretched-link +```` -.. toctree:: - :hidden: - :caption: Getting Started - :maxdepth: 2 - - overview.md - fundamentals.md - general_architecture.md - installation.md - -.. toctree:: - :hidden: - :caption: Usage Guide - :maxdepth: 2 - - jupyter/cuds_api.ipynb - jupyter/sessions_and_vars.ipynb - utils.md - jupyter/multiple_wrappers.ipynb - jupyter/import_export.ipynb - jupyter/simlammps.ipynb - jupyter/quantum_espresso.ipynb - -.. toctree:: - :hidden: - :caption: Working with Ontologies - :maxdepth: 2 - - ontology_intro.md - ontologies_included.md - yaml.md - owl.md - jupyter/ontology_interface.ipynb - -.. toctree:: - :hidden: - :caption: Wrapper Development - :maxdepth: 2 - - wrapper_development.md - jupyter/wrapper_development.ipynb - -.. toctree:: - :hidden: - :caption: API Reference - :maxdepth: 2 - - api_ref.md - -.. toctree:: - :hidden: - :caption: Additional Info - :maxdepth: 2 - - contribute.md - detailed_design.md - links.md - license.md - Data protection - Imprint - contact.md +```{toctree} +:hidden: true +:caption: Getting Started +:maxdepth: 2 + +overview +fundamentals +general_architecture +installation +``` + +```{toctree} +:hidden: true +:caption: Usage Guide +:maxdepth: 2 + +jupyter/cuds_api +jupyter/sessions_and_vars +utils +jupyter/multiple_wrappers +jupyter/import_export +jupyter/simlammps +jupyter/quantum_espresso +``` + +```{toctree} +:hidden: true +:caption: Working with Ontologies +:maxdepth: 2 + +ontology_intro +ontologies_included +yaml +owl +jupyter/ontology_interface +``` + +```{toctree} +:hidden: true +:caption: Wrapper Development +:maxdepth: 2 + +wrapper_development +jupyter/wrapper_development +``` + +```{toctree} +:hidden: true +:caption: API Reference +:maxdepth: 2 + +api_ref +``` + +```{toctree} +:hidden: true +:caption: Additional Info +:maxdepth: 2 + +contribute +detailed_design +links +license +Data protection +Imprint +contact ``` diff --git a/docs/source/links.md b/docs/source/links.md index c71576d..864dd64 100644 --- a/docs/source/links.md +++ b/docs/source/links.md @@ -16,7 +16,7 @@ Technologies used: # Acknowledgements SimPhoNy OSP-core and wrappers development is supported by the following Grants: -```eval_rst +```{eval-rst} ============= ============ =============================== ================== Project Programme Call ID Grant Agreement ID ============= ============ =============================== ================== @@ -48,7 +48,7 @@ demonstrated under the project https://github.com/simphony/simphony-common. # Compatibility table The following table describes the compatibilities between of SimPhoNy docs and OSP-core. -```eval_rst +```{eval-rst} .. table:: :align: center diff --git a/docs/source/utils.md b/docs/source/utils.md index 8df48d8..d8a1b40 100644 --- a/docs/source/utils.md +++ b/docs/source/utils.md @@ -114,8 +114,7 @@ and another one as a [dot](https://www.graphviz.org/pdf/dotguide.pdf) graph ([cu Another useful dot graph visualisation tool called [ontology2dot](#ontology2dot) is available for ontology YML files. -```eval_rst -.. warning:: +```{warning} The graphic visualisation tools that generate a dot file require Graphviz to be installed in the system. ``` diff --git a/docs/source/wrapper_development.md b/docs/source/wrapper_development.md index 5f10f0d..4d880e6 100644 --- a/docs/source/wrapper_development.md +++ b/docs/source/wrapper_development.md @@ -109,8 +109,7 @@ Your new wrapper session would be located of the OSP-core box, together among other wrapper sessions like the Simlammps, Sqlite or SqlAlchemy sessions. -```eval_rst -.. uml:: +```{uml} :caption: Simplified session inheritance scheme :align: center diff --git a/docs/source/yaml.md b/docs/source/yaml.md index 6fba7a6..77e7961 100644 --- a/docs/source/yaml.md +++ b/docs/source/yaml.md @@ -2,8 +2,7 @@ This file describes how you can create ontologies using YAML. -```eval_rst -.. tip:: +```{tip} If you have an ontology where all entity names are in ALL_UPPERCASE, you can use the commandline tool `yaml2camelcase` that is shipped with OSP-core to transform it to an ontology with CamelCase entity names. @@ -157,8 +156,7 @@ It can additionally have the following keys: > > For example: The datatype of entity numberOfOccurrences is INT. -> ```eval_rst ->.. note:: +> ```{note} > The implementation of the vectors is experimental and will be updated as soon as > EMMO has established an appropriate wait of representing them > ``` diff --git a/local_build.Dockerfile b/local_build.Dockerfile index 3db995e..d5073e8 100644 --- a/local_build.Dockerfile +++ b/local_build.Dockerfile @@ -8,7 +8,7 @@ RUN apt-get install -y texlive-latex-recommended \ latexmk WORKDIR /app -ADD . . +ADD requirements.txt . RUN pip install -r requirements.txt diff --git a/requirements.txt b/requirements.txt index 5f533f4..7528b30 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ git+https://github.com/simphony/osp-core.git#egg=osp-core sphinx==3.5.3 -recommonmark==0.7.1 +myst-parser==0.15.2 sphinx_rtd_theme==0.5.2 sphinxcontrib-plantuml==0.20.1 nbsphinx==0.8.2 From c28a1af067c11eed5357e2acd5bdf22667d5389b Mon Sep 17 00:00:00 2001 From: dea Date: Tue, 21 Sep 2021 10:59:09 +0200 Subject: [PATCH 10/15] Minor fixes --- docs/source/general_architecture.md | 8 ++++---- docs/source/jupyter/ontology_interface.ipynb | 14 +++++++------- docs/source/ontologies_included.md | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/source/general_architecture.md b/docs/source/general_architecture.md index 78c2dbb..5e2d999 100644 --- a/docs/source/general_architecture.md +++ b/docs/source/general_architecture.md @@ -1,5 +1,5 @@ # General architecture -The following architecture has the aim to cover and support the goals presented in the [motivation section](./motivation.md). +The following architecture has the aim to cover and support the goals presented in the [overview section](overview.md). ```{uml} :align: center @@ -121,10 +121,10 @@ For that, a 3 layer schema is used: The closer to the user, the closer to the ontology concepts. The abstraction is replaced by specificity when you move towards the backend. -For example, the City, Street or Neighborhood classes from the demonstrative [City Ontology](./ontologies_included.md#the-city-ontology) included in OSP-core, as well as the individuals that can be instantiated using them, would be part of the semantic layer. Any wrapper (e.g. the included [SQLite wrapper](https://github.com/simphony/osp-core/tree/master/osp/wrappers/sqlite)), would be part of the interoperability layer. Finally, following the SQLite example, the [sqlite3 library](https://docs.python.org/3/library/sqlite3.html) from python would be part of the syntactic layer. +For example, the City, Street or Neighborhood classes from the demonstrative [City Ontology](ontologies_included.md#the-city-ontology) included in OSP-core, as well as the individuals that can be instantiated using them, would be part of the semantic layer. Any wrapper (e.g. the included [SQLite wrapper](https://github.com/simphony/osp-core/tree/master/osp/wrappers/sqlite)), would be part of the interoperability layer. Finally, following the SQLite example, the [sqlite3 library](https://docs.python.org/3/library/sqlite3.html) from python would be part of the syntactic layer. -For a full explanation on the architecture and design, go to [detailed design](./detailed_design.md). +For a full explanation on the architecture and design, go to [detailed design](detailed_design.md). ## OSP-core [OSP-core](https://github.com/simphony/osp-core) is the main component of the SimPhoNy framework. @@ -241,4 +241,4 @@ Since each backend is different, for more detailed documentation of each wrapper we suggest going through the different available [repositories](https://gitlab.cc-asp.fraunhofer.de/simphony/wrappers/). For more technical information regarding wrappers, particularly for wrapper developers, -we recommend visiting [wrapper development](./wrapper_development.md). +we recommend visiting [wrapper development](wrapper_development.md). diff --git a/docs/source/jupyter/ontology_interface.ipynb b/docs/source/jupyter/ontology_interface.ipynb index 774ab49..2e259aa 100644 --- a/docs/source/jupyter/ontology_interface.ipynb +++ b/docs/source/jupyter/ontology_interface.ipynb @@ -28,7 +28,7 @@ "source": [ "In an ontological framework, ontology entities are used as a knowledge representation form. Those can be further categorized in two groups: ontology individuals ([assertional knowledge](https://en.wikipedia.org/wiki/Abox)), and ontology classes, relationships and attributes ([terminological knowledge](https://en.wikipedia.org/wiki/Tbox)).\n", "\n", - "In a [previous tutorial](./cuds-api.html), we have discussed how to work with CUDS objects, which represent ontology individuals. In this tutorial, we present the API of all the other entities instead: ontology classes, relationships and attributes. These are defined in an ontology installation file in [YAML](../yaml.md) or [OWL](../owl.md) format. The presented API enables you to access the entities and navigate within an ontology." + "In a [previous tutorial](./cuds_api.html), we have discussed how to work with CUDS objects, which represent ontology individuals. In this tutorial, we present the API of all the other entities instead: ontology classes, relationships and attributes. These are defined in an ontology installation file in [YAML](../yaml.md) or [OWL](../owl.md) format. The presented API enables you to access the entities and navigate within an ontology." ], "metadata": {} }, @@ -93,7 +93,7 @@ "source": [ "## Accessing entities: the namespace object\n", "\n", - "To acces ontology entitites, we first need to know the aliases of the installed ontology namespaces. In each ontology [YAML installation file](../yaml.md), the namespace(s) that it contains is(are) stated at the top of the file. For example, at the top of the [city ontology installation file](https://github.com/simphony/osp-core/blob/master/osp/core/ontology/docs/city.ontology.yml) you may find:\n", + "To access ontology entities, we first need to know the aliases of the installed ontology namespaces. In each ontology [YAML installation file](../yaml.md), the namespace(s) that it contains is(are) stated at the top of the file. For example, at the top of the [city ontology installation file](https://github.com/simphony/osp-core/blob/master/osp/core/ontology/docs/city.ontology.yml) you may find:\n", "\n", "```yaml\n", "---\n", @@ -105,7 +105,7 @@ " ...\n", "```\n", "\n", - "Alternatively, you can use [pico ontology installation tool](https://simphony.readthedocs.io/en/latest/utils.html#pico-installs-cuds-ontologies) to see the installed namespaces:" + "Alternatively, you can use [pico ontology installation tool](../utils.md#pico-installs-cuds-ontologies) to see the installed namespaces:" ], "metadata": {} }, @@ -607,7 +607,7 @@ "source": [ "## Testing the type of the entities\n", "\n", - "In the ontology, three types of entities can be defined: classes, relationships and attributes. OSP-core has its own vocabulary, the [CUBA namespace](../yaml.html#the-cuba-namespace), which describes, among other things, such entity types. Relationships are subclasses of `CUBA.RELATIONSHIP` and attributes are subclasses of `CUBA.ATTRIBUTE`. There are different Python objects for the different entity types. You can use both to check which type of entity you are dealing with:" + "In the ontology, three types of entities can be defined: classes, relationships and attributes. OSP-core has its own vocabulary, the [CUBA namespace](../yaml.md#the-cuba-namespace), which describes, among other things, such entity types. Relationships are subclasses of `CUBA.RELATIONSHIP` and attributes are subclasses of `CUBA.ATTRIBUTE`. There are different Python objects for the different entity types. You can use both to check which type of entity you are dealing with:" ], "metadata": {} }, @@ -705,7 +705,7 @@ { "cell_type": "markdown", "source": [ - "In addition, OSP-core has special support for the `owl:Restriction` and `owl:Composition` classes of the [Web Ontology Language (OWL)](https://en.wikipedia.org/wiki/Web_Ontology_Language) (check the [OWL ontology specification](https://www.w3.org/TR/owl2-syntax/) for more details). Such OWL classes are represented by the python classes `Restriction` and `Composition`. See [operations specific to ontology axioms](./ontology-interface.html#Operations-specific-to-ontology-axioms) for more information.\n", + "In addition, OSP-core has special support for the `owl:Restriction` and `owl:Composition` classes of the [Web Ontology Language (OWL)](https://en.wikipedia.org/wiki/Web_Ontology_Language) (check the [OWL ontology specification](https://www.w3.org/TR/owl2-syntax/) for more details). Such OWL classes are represented by the python classes `Restriction` and `Composition`. See [operations specific to ontology axioms](#Operations-specific-to-ontology-axioms) for more information.\n", "\n", "For example, in the city ontology, the citizens have a restriction on the name and age attributes: a citizen must have exactly one name and one age. These axioms can be accessed using the `axioms` property, which returns both the restriction and compositions affecting the class." ], @@ -889,7 +889,7 @@ { "cell_type": "markdown", "source": [ - "Check the API Reference for more details on the methods [_convert_to_datatype_](http://127.0.0.1:8000/api_ref.html#osp.core.ontology.attribute.OntologyAttribute.convert_to_datatype) and [_convert_to_basic_type_](http://127.0.0.1:8000/api_ref.html#osp.core.ontology.attribute.OntologyAttribute.convert_to_basic_type)." + "Check the API Reference for more details on the methods [_convert_to_datatype_](../api_ref.md#osp.core.ontology.attribute.OntologyAttribute.convert_to_datatype) and [_convert_to_basic_type_](../api_ref.md#osp.core.ontology.attribute.OntologyAttribute.convert_to_basic_type)." ], "metadata": {} }, @@ -898,7 +898,7 @@ "source": [ "## Creating CUDS using ontology classes\n", "\n", - "You can call ontology classes to create CUDS objects. To learn more, have a look at the [CUDS API tutorial](./cuds-api.html)." + "You can call ontology classes to create CUDS objects. To learn more, have a look at the [CUDS API tutorial](./cuds_api.html)." ], "metadata": {} }, diff --git a/docs/source/ontologies_included.md b/docs/source/ontologies_included.md index 3916e6a..c14b2e9 100644 --- a/docs/source/ontologies_included.md +++ b/docs/source/ontologies_included.md @@ -11,7 +11,7 @@ The city ontology provides the concepts to describe people and buildings in a city. In this graph we show the different entities in the ontology. We used [Ontology2Dot](utils.md#ontology2dot) for that: -![ontology2dot sample image](./_static/img/ontology2dot.png) +![ontology2dot sample image](_static/img/ontology2dot.png) To use the city ontology you have to install it using the tool [Pico](utils.md#pico-installs-cuds-ontologies): @@ -19,12 +19,12 @@ To use the city ontology you have to install it using the tool [Pico](utils.md#p pico install city ``` -Take a look at our [examples](jupyter/cuds-api.md) to see how you can build your own city! +Take a look at our [examples](jupyter/cuds_api.md) to see how you can build your own city! ## Working with EMMO The second ontology that is ready to be used out of the box is the Elementary Multiperspective Material Ontology, -or EMMO in short. For a short introduction, see the [fundamentals](./fundamentals.md#emmo). +or EMMO in short. For a short introduction, see the [fundamentals](fundamentals.md#emmo). You can install EMMO using [Pico](utils.md#pico-installs-cuds-ontologies). From e5d64716028e73b20e0e873cc26211500b3827fa Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Wed, 22 Sep 2021 16:32:28 +0200 Subject: [PATCH 11/15] Replace Recommonmark by MyST (#188) Fix leftover tags in admonitions --- docs/source/contribute.md | 12 ++++++------ docs/source/detailed_design.md | 10 +++++----- docs/source/general_architecture.md | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/source/contribute.md b/docs/source/contribute.md index 65aaf91..129b197 100644 --- a/docs/source/contribute.md +++ b/docs/source/contribute.md @@ -44,18 +44,18 @@ All wrappers and OSP-core are part of a common directory structure: The changes should be clearly explained in the issue/Pull Request. ```{warning} If the issue is a critical software bug detected in the stable release, a - :code:`hotfix branch` should be created from the :code:`master/main` branch + `hotfix branch` should be created from the `master/main` branch instead. After committing to such branch, a new Pull/Merge request (targeting - :code:`dev`) should be created. If the fix is correct, the project owner - will merge the PR to :code:`dev`, additionally merge the - :code:`hotfix branch` to :code:`master/main`, and then delete the - :code:`hotfix branch`. + `dev`) should be created. If the fix is correct, the project owner + will merge the PR to `dev`, additionally merge the + `hotfix branch` to `master/main`, and then delete the + `hotfix branch`. ``` - Once the features for a release have been reached, `dev` will be merged to `master/main`. Every new commit in the `master/main` branch generally corresponds - to a new release, which is labeled with a + to a new release, which is labelled with a [git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) matching its version number. An exception to this rule may apply, for example when several critical hotfixes are applied in a row, as it would then be better to just to diff --git a/docs/source/detailed_design.md b/docs/source/detailed_design.md index 24b17ea..e80f9f2 100644 --- a/docs/source/detailed_design.md +++ b/docs/source/detailed_design.md @@ -468,7 +468,7 @@ cuds_obj = some_namespace.OntologyClass() and then they are yielded like a generator ```{hint} - There is also an :code:`is_a` method for checking oclass inheritance. + There is also an `is_a` method for checking oclass inheritance. ``` ```{note} @@ -626,10 +626,10 @@ This will define which methods have to be implemented and `_engine` as the acces trigger an action on the backend (`run` and `commit`, respectively). ```{note} - You might have noticed that the semantic layer defines :code:`remove` in the API, - but in the session and registry we use :code:`delete`. The different between them - is conceptual: :code:`remove` is interpreted as detachment i.e. removal of edges, - while :code:`delete` implies the erasure of the note itself. + You might have noticed that the semantic layer defines `remove` in the API, + but in the session and registry we use `delete`. The different between them + is conceptual: `remove` is interpreted as detachment i.e. removal of edges, + while `delete` implies the erasure of the node itself. ``` #### Buffers diff --git a/docs/source/general_architecture.md b/docs/source/general_architecture.md index 5e2d999..4050b6e 100644 --- a/docs/source/general_architecture.md +++ b/docs/source/general_architecture.md @@ -114,7 +114,7 @@ For that, a 3 layer schema is used: backend -[hidden]-> spe ``` -- The *Semantic layer* are the classes generated from the ontology and follow the CUDS API. +- The *Semantic layer* are the classes generated from the ontology with the CUDS API. - The *Interoperability layer* maps the changes in the semantic layer to calls in the syntactic layer. - The *Syntactic layer* provides access to the backend. From d1709c6e5f3db651dda5674ef5d5c32917aa02b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Dom=C3=ADnguez?= <43052541+kysrpex@users.noreply.github.com> Date: Fri, 24 Sep 2021 18:02:56 +0200 Subject: [PATCH 12/15] Update compatibility table for OSP-core version 3.5.8 (#189) --- docs/source/links.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/links.md b/docs/source/links.md index 864dd64..71a6ea4 100644 --- a/docs/source/links.md +++ b/docs/source/links.md @@ -57,6 +57,7 @@ The following table describes the compatibilities between of SimPhoNy docs and O ============= ========== SimPhoNy docs OSP-core ============= ========== + 2.4.4 3.5.8 2.4.3 3.5.5 2.4.2 3.5.4 2.4.1 3.5.3.1-beta From 56c0f007f045e629cc1af7ad2c83b0dc6c4ef87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Dom=C3=ADnguez?= Date: Fri, 24 Sep 2021 18:09:45 +0200 Subject: [PATCH 13/15] # Conflicts: # docs/source/contribute.md # docs/source/links.md # packageinfo.py --- docs/source/jupyter/quantum-espresso.ipynb | 447 +++++++++++++++++++++ 1 file changed, 447 insertions(+) create mode 100644 docs/source/jupyter/quantum-espresso.ipynb diff --git a/docs/source/jupyter/quantum-espresso.ipynb b/docs/source/jupyter/quantum-espresso.ipynb new file mode 100644 index 0000000..31b4255 --- /dev/null +++ b/docs/source/jupyter/quantum-espresso.ipynb @@ -0,0 +1,447 @@ +{ + "metadata": { + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": 3 + }, + "orig_nbformat": 2, + "kernelspec": { + "name": "python_defaultSpec_1597048081738", + "display_name": "Python 3.8.2 64-bit" + } + }, + "nbformat": 4, + "nbformat_minor": 2, + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Tutorial: Quantum Espresso Wrapper\n", + "\n", + "In this tutorial we will go through a simple example of how to use the wrapper for the Quantum Espresso simulation engine.\n", + "You can find the wrapper [here](https://github.com/simphony/quantum-espresso-wrapper).\n", + "\n", + "## Background\n", + "This is an example of a slightly different design based upon the input-output functionality of certain simulation engines such as Quantum Espresso and Gromacs.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Let's get hands-on\n", + "### Installation\n", + "To run the local installation of Quantum Espresso, simply run `./install_engine.sh`. This should check for the prerequisites and compile the code for Quantum Espresso for you.\n", + "\n", + "If the script runs into an error finding openmpi-bin or something like that, try running `apt-get update` and try again. \n", + "Once the installation has completed, try running `pw.x` to see if the installation has succeeded. If this does not work, then try adding `export PATH=$PATH:/home/username/qe-6.1/bin/` at the end of `.bashrc` located at your home folder. \n", + " \n", + "Once you have verified that `pw.x` works, install the ontology via `pico install ontology.simlammps.yml`, and make sure to run `python3 setup.py` located in the root of the quantum espresso wrapper folder. \n", + "\n", + "That should be all needed to use Quantum Espresso!\n", + "\n", + "### Simple example\n", + "\n", + "This is an adaptation of quantum-espresso-wrapper/examples/Simple.py. As usual, we need to import the necessary components:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np \n", + "\n", + "from osp.core.namespaces import QE\n", + "from osp.core.utils import pretty_print\n", + "from osp.wrappers.quantumespresso.qe_session import qeSession" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, we create simulation and its K points, which determine at what points it samples the cell" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "sim = QE.Simulation()\n", + "k = QE.K_POINTS(vector = (7, 7, 7), unit = \"\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, we create a cell, the element Silicon, a pseudopotential, an atom and the cell parameters. Note that the pseudopotential files should ALWAYS be located inside of a folder named `$PSEUDO_DIR` inside of wherever you are running the simulation." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "SiCell = QE.Cell()\n", + "Si = QE.Element(name = \"Si\")\n", + "SiPseudo = QE.PSEUDOPOTENTIAL(name = \"Si.pbe-n-kjpaw_psl.1.0.0.UPF\")\n", + "Si1 = QE.Atom()\n", + "SiParams = QE.CellParams()\n", + "celldm1 = QE.Celldm1(value = 5.43070, unit = \"au\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, we connect these all to each other using the `add` method." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "" + }, + "metadata": {}, + "execution_count": 4 + } + ], + "source": [ + "Si.add(SiPseudo, Si1)\n", + "Si.add(QE.Mass(value = 28.085, unit = \"amu\"))\n", + "SiCell.add(Si1, SiParams)\n", + "Si1.add(QE.Position(vector = (0, 0, 0), unit = \"\"))\n", + "SiCell.add(celldm1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We specify the cell parameters:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "[,\n ,\n ]" + }, + "metadata": {}, + "execution_count": 5 + } + ], + "source": [ + "SiParams.add(QE.CellParameterX(vector = (0.5, 0.5, 0), unit = \"\"),\n", + " QE.CellParameterY(vector = (0.5, 0, 0.5), unit = \"\"),\n", + " QE.CellParameterZ(vector = (0, 0.5, 0.5), unit = \"\"))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And then we add everything created so far to the simulation:\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "" + }, + "metadata": {}, + "execution_count": 6 + } + ], + "source": [ + "sim.add(SiCell)\n", + "sim.add(Si)\n", + "sim.add(k)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "While we're add it, let's add some variables to the simulation which we can check to see if they have been updated. They will not be taken into account when simulating, so they're there for control purposes.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "" + }, + "metadata": {}, + "execution_count": 7 + } + ], + "source": [ + "sim.add(QE.Pressure(value = 100, unit = \"kbar\"))\n", + "sim.add(QE.StressTensor(tensor2 = np.zeros((3, 3)), unit = \"kbar\"))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's check out what this simulation looks like now with the `pretty_print` function:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" + } + ], + "source": [ + "pretty_print(sim)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, it's time to get the simulation running:" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "Running calculation...\n/mnt/c/iwm/docs/si.pwscf.in\npw.x -i /mnt/c/iwm/docs/si.pwscf.in > /mnt/c/iwm/docs/si.pwscf.out\n" + } + ], + "source": [ + "session = qeSession()\n", + "quantum_espresso_wrapper = QE.QEWrapper(session = session)\n", + "quantum_espresso_wrapper.add(sim)\n", + "print(\"Running calculation...\")\n", + "\n", + "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"scf\", root = \"\", CONTROL = {'pseudo_dir': \"'.'\"})" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now let's check the results of our calculation:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 15c6637e-9124-44dd-a1d3-f225203c1bfc\n . path: /mnt/c/iwm/docs/si.pwscf.out\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" + } + ], + "source": [ + "pretty_print(sim)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As you can see, the original part of the cuds tree is still there, with everything mostly the same. The new parts are:\n", + "\n", + "- The qe.PwOut cuds object. This is the output file of the simulation, in case there is something that the wrapper does not parse but that you would still like to see.\n", + "- The qe.TotalEnergy cuds object. This was parsed from the qe.PwOut file itself.\n", + "- The qe.Force cuds object. This represents the force exerted on the atom(s).\n", + "\n", + "The updated parts are:\n", + "\n", + "- The qe.Pressure cuds object, having changed in value from 100 kbar to 5723.64 kbar.\n", + "- The qe.StressTensor cuds object, which is no longer zero." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's see if we can do better and calculate some bands structures:" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "output_type": "error", + "ename": "TypeError", + "evalue": "_run() missing 1 required positional argument: 'simulation'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" + ] + } + ], + "source": [ + "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"pw.x\", calculation_type = \"bands\")\n", + "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"bands.x\", calculation_type = \"\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Although the cuds structure won't have changed much by this, the data is there in the folder.\n", + "\n", + "Now let's try to relax this cell. While it isn't a real cell, we can still perform the calculations to relax it to know what the movement of the atoms would be like if it were a real cell (warning, perform vc-relax type calculations with caution. These examples are designed to be lightweight and non-indicative of real-world applications)." + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "output_type": "error", + "ename": "TypeError", + "evalue": "_run() missing 1 required positional argument: 'simulation'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" + ] + } + ], + "source": [ + "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "- Cuds object:\n uuid: 90361daa-6905-4566-979e-11b3b0dd4e85\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: f7548873-28e9-4d76-86da-6fddb687d29e\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 48d4483b-7c72-4454-8041-581dc73fd216\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: 9d61e990-2509-474b-935e-618ca11bb40d\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: f2655054-efa7-4b39-9f0a-cf6453be68ec\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: 55647575-ea8f-4ef7-aee8-2a3333a4ec71\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 92be9c63-ee80-46d9-8853-ccb562e94a5b\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . . uuid: db776c65-9d2e-448e-bc55-5fe0f9c7ee75\n . . unit: au\n . . value: 5.4307\n . - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . (already printed)\n . - qe.Atom cuds object:\n . . uuid: c2094a19-8769-4298-a50a-be1f8befe5bf\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 4087ce47-16f0-4449-b8c4-4577e6d265e2\n . . vector: [0.25 0.25 0.26]\n . . unit: \n . - qe.Mass cuds object:\n . . uuid: 5d57a768-d315-4f91-84a8-fcfad9aae382\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: ab064983-5cc9-418e-a9e7-3357c04388f5\n - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . (already printed)\n - qe.K_POINTS cuds object:\n . uuid: 38385f3b-128c-491f-91f4-44de15055d56\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: 57f47fa8-4588-488f-8c89-fa8a0f37f567\n . unit: kbar\n . value: 100.0\n - qe.Pressure cuds object:\n . uuid: beac6977-01cf-4b4d-b89b-1b4d4eecf5c0\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 7890c86c-9f6f-42b3-a02c-cd57f5307c75\n . path: si.pwscf.out\n - qe.PwOut cuds object:\n . uuid: 5c7e31f9-6e55-4ddf-af62-5a3e58811464\n . path: si.pwscf.out\n - qe.StressTensor cuds object:\n . uuid: 16b33d51-0f6d-4451-a919-da494a13082f\n . unit: kbar\n . tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n - qe.StressTensor cuds object:\n uuid: 590ad64e-d110-4711-90c6-0986bb53dafc\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" + } + ], + "source": [ + "pretty_print(sim)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this example, the position hasn't changed. So let's spice things up a little bit and add another atom, and then relax:" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "error", + "ename": "ValueError", + "evalue": " is already in the container", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mSi2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAtom\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mSi2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPosition\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvector\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.26\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0munit\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mSiCell\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mSi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/mnt/c/IWM/osp-core-3.4.0-dev/osp/core/cuds.py\u001b[0m in \u001b[0;36madd\u001b[0;34m(self, rel, *args)\u001b[0m\n\u001b[1;32m 161\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrel\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muid\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mrel\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[0mmessage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'{!r} is already in the container'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 163\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 164\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 165\u001b[0m \u001b[0marg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recursive_store\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mold_objects\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mValueError\u001b[0m: is already in the container" + ] + } + ], + "source": [ + "Si2 = QE.Atom()\n", + "Si2.add(QE.Position(vector = (0.25, 0.25, 0.26), unit = \"\"))\n", + "SiCell.add(Si)\n", + "Si.add(Si2)\n", + "pretty_print(sim)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "output_type": "error", + "ename": "TypeError", + "evalue": "_run() missing 1 required positional argument: 'simulation'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" + ] + } + ], + "source": [ + "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})\n", + "pretty_print(sim)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 +} From 578ba47791e2c53371c4f90beb82e0a83636565b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Dom=C3=ADnguez?= <43052541+kysrpex@users.noreply.github.com> Date: Fri, 24 Sep 2021 18:12:07 +0200 Subject: [PATCH 14/15] Deleted old quantum espresso file from `master` (#190) --- docs/source/jupyter/quantum-espresso.ipynb | 447 --------------------- 1 file changed, 447 deletions(-) delete mode 100644 docs/source/jupyter/quantum-espresso.ipynb diff --git a/docs/source/jupyter/quantum-espresso.ipynb b/docs/source/jupyter/quantum-espresso.ipynb deleted file mode 100644 index 31b4255..0000000 --- a/docs/source/jupyter/quantum-espresso.ipynb +++ /dev/null @@ -1,447 +0,0 @@ -{ - "metadata": { - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": 3 - }, - "orig_nbformat": 2, - "kernelspec": { - "name": "python_defaultSpec_1597048081738", - "display_name": "Python 3.8.2 64-bit" - } - }, - "nbformat": 4, - "nbformat_minor": 2, - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Tutorial: Quantum Espresso Wrapper\n", - "\n", - "In this tutorial we will go through a simple example of how to use the wrapper for the Quantum Espresso simulation engine.\n", - "You can find the wrapper [here](https://github.com/simphony/quantum-espresso-wrapper).\n", - "\n", - "## Background\n", - "This is an example of a slightly different design based upon the input-output functionality of certain simulation engines such as Quantum Espresso and Gromacs.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Let's get hands-on\n", - "### Installation\n", - "To run the local installation of Quantum Espresso, simply run `./install_engine.sh`. This should check for the prerequisites and compile the code for Quantum Espresso for you.\n", - "\n", - "If the script runs into an error finding openmpi-bin or something like that, try running `apt-get update` and try again. \n", - "Once the installation has completed, try running `pw.x` to see if the installation has succeeded. If this does not work, then try adding `export PATH=$PATH:/home/username/qe-6.1/bin/` at the end of `.bashrc` located at your home folder. \n", - " \n", - "Once you have verified that `pw.x` works, install the ontology via `pico install ontology.simlammps.yml`, and make sure to run `python3 setup.py` located in the root of the quantum espresso wrapper folder. \n", - "\n", - "That should be all needed to use Quantum Espresso!\n", - "\n", - "### Simple example\n", - "\n", - "This is an adaptation of quantum-espresso-wrapper/examples/Simple.py. As usual, we need to import the necessary components:" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np \n", - "\n", - "from osp.core.namespaces import QE\n", - "from osp.core.utils import pretty_print\n", - "from osp.wrappers.quantumespresso.qe_session import qeSession" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, we create simulation and its K points, which determine at what points it samples the cell" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "sim = QE.Simulation()\n", - "k = QE.K_POINTS(vector = (7, 7, 7), unit = \"\")\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, we create a cell, the element Silicon, a pseudopotential, an atom and the cell parameters. Note that the pseudopotential files should ALWAYS be located inside of a folder named `$PSEUDO_DIR` inside of wherever you are running the simulation." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "SiCell = QE.Cell()\n", - "Si = QE.Element(name = \"Si\")\n", - "SiPseudo = QE.PSEUDOPOTENTIAL(name = \"Si.pbe-n-kjpaw_psl.1.0.0.UPF\")\n", - "Si1 = QE.Atom()\n", - "SiParams = QE.CellParams()\n", - "celldm1 = QE.Celldm1(value = 5.43070, unit = \"au\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, we connect these all to each other using the `add` method." - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "" - }, - "metadata": {}, - "execution_count": 4 - } - ], - "source": [ - "Si.add(SiPseudo, Si1)\n", - "Si.add(QE.Mass(value = 28.085, unit = \"amu\"))\n", - "SiCell.add(Si1, SiParams)\n", - "Si1.add(QE.Position(vector = (0, 0, 0), unit = \"\"))\n", - "SiCell.add(celldm1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We specify the cell parameters:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "[,\n ,\n ]" - }, - "metadata": {}, - "execution_count": 5 - } - ], - "source": [ - "SiParams.add(QE.CellParameterX(vector = (0.5, 0.5, 0), unit = \"\"),\n", - " QE.CellParameterY(vector = (0.5, 0, 0.5), unit = \"\"),\n", - " QE.CellParameterZ(vector = (0, 0.5, 0.5), unit = \"\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "And then we add everything created so far to the simulation:\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "" - }, - "metadata": {}, - "execution_count": 6 - } - ], - "source": [ - "sim.add(SiCell)\n", - "sim.add(Si)\n", - "sim.add(k)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "While we're add it, let's add some variables to the simulation which we can check to see if they have been updated. They will not be taken into account when simulating, so they're there for control purposes.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "" - }, - "metadata": {}, - "execution_count": 7 - } - ], - "source": [ - "sim.add(QE.Pressure(value = 100, unit = \"kbar\"))\n", - "sim.add(QE.StressTensor(tensor2 = np.zeros((3, 3)), unit = \"kbar\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's check out what this simulation looks like now with the `pretty_print` function:" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" - } - ], - "source": [ - "pretty_print(sim)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, it's time to get the simulation running:" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "Running calculation...\n/mnt/c/iwm/docs/si.pwscf.in\npw.x -i /mnt/c/iwm/docs/si.pwscf.in > /mnt/c/iwm/docs/si.pwscf.out\n" - } - ], - "source": [ - "session = qeSession()\n", - "quantum_espresso_wrapper = QE.QEWrapper(session = session)\n", - "quantum_espresso_wrapper.add(sim)\n", - "print(\"Running calculation...\")\n", - "\n", - "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"scf\", root = \"\", CONTROL = {'pseudo_dir': \"'.'\"})" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now let's check the results of our calculation:" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 15c6637e-9124-44dd-a1d3-f225203c1bfc\n . path: /mnt/c/iwm/docs/si.pwscf.out\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" - } - ], - "source": [ - "pretty_print(sim)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As you can see, the original part of the cuds tree is still there, with everything mostly the same. The new parts are:\n", - "\n", - "- The qe.PwOut cuds object. This is the output file of the simulation, in case there is something that the wrapper does not parse but that you would still like to see.\n", - "- The qe.TotalEnergy cuds object. This was parsed from the qe.PwOut file itself.\n", - "- The qe.Force cuds object. This represents the force exerted on the atom(s).\n", - "\n", - "The updated parts are:\n", - "\n", - "- The qe.Pressure cuds object, having changed in value from 100 kbar to 5723.64 kbar.\n", - "- The qe.StressTensor cuds object, which is no longer zero." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's see if we can do better and calculate some bands structures:" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "output_type": "error", - "ename": "TypeError", - "evalue": "_run() missing 1 required positional argument: 'simulation'", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" - ] - } - ], - "source": [ - "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"pw.x\", calculation_type = \"bands\")\n", - "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"bands.x\", calculation_type = \"\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Although the cuds structure won't have changed much by this, the data is there in the folder.\n", - "\n", - "Now let's try to relax this cell. While it isn't a real cell, we can still perform the calculations to relax it to know what the movement of the atoms would be like if it were a real cell (warning, perform vc-relax type calculations with caution. These examples are designed to be lightweight and non-indicative of real-world applications)." - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [ - { - "output_type": "error", - "ename": "TypeError", - "evalue": "_run() missing 1 required positional argument: 'simulation'", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" - ] - } - ], - "source": [ - "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "- Cuds object:\n uuid: 90361daa-6905-4566-979e-11b3b0dd4e85\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: f7548873-28e9-4d76-86da-6fddb687d29e\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 48d4483b-7c72-4454-8041-581dc73fd216\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: 9d61e990-2509-474b-935e-618ca11bb40d\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: f2655054-efa7-4b39-9f0a-cf6453be68ec\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: 55647575-ea8f-4ef7-aee8-2a3333a4ec71\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 92be9c63-ee80-46d9-8853-ccb562e94a5b\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . . uuid: db776c65-9d2e-448e-bc55-5fe0f9c7ee75\n . . unit: au\n . . value: 5.4307\n . - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . (already printed)\n . - qe.Atom cuds object:\n . . uuid: c2094a19-8769-4298-a50a-be1f8befe5bf\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 4087ce47-16f0-4449-b8c4-4577e6d265e2\n . . vector: [0.25 0.25 0.26]\n . . unit: \n . - qe.Mass cuds object:\n . . uuid: 5d57a768-d315-4f91-84a8-fcfad9aae382\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: ab064983-5cc9-418e-a9e7-3357c04388f5\n - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . (already printed)\n - qe.K_POINTS cuds object:\n . uuid: 38385f3b-128c-491f-91f4-44de15055d56\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: 57f47fa8-4588-488f-8c89-fa8a0f37f567\n . unit: kbar\n . value: 100.0\n - qe.Pressure cuds object:\n . uuid: beac6977-01cf-4b4d-b89b-1b4d4eecf5c0\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 7890c86c-9f6f-42b3-a02c-cd57f5307c75\n . path: si.pwscf.out\n - qe.PwOut cuds object:\n . uuid: 5c7e31f9-6e55-4ddf-af62-5a3e58811464\n . path: si.pwscf.out\n - qe.StressTensor cuds object:\n . uuid: 16b33d51-0f6d-4451-a919-da494a13082f\n . unit: kbar\n . tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n - qe.StressTensor cuds object:\n uuid: 590ad64e-d110-4711-90c6-0986bb53dafc\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" - } - ], - "source": [ - "pretty_print(sim)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In this example, the position hasn't changed. So let's spice things up a little bit and add another atom, and then relax:" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "error", - "ename": "ValueError", - "evalue": " is already in the container", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mSi2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAtom\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mSi2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPosition\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvector\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.26\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0munit\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mSiCell\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mSi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/mnt/c/IWM/osp-core-3.4.0-dev/osp/core/cuds.py\u001b[0m in \u001b[0;36madd\u001b[0;34m(self, rel, *args)\u001b[0m\n\u001b[1;32m 161\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrel\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muid\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mrel\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[0mmessage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'{!r} is already in the container'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 163\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 164\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 165\u001b[0m \u001b[0marg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recursive_store\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mold_objects\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValueError\u001b[0m: is already in the container" - ] - } - ], - "source": [ - "Si2 = QE.Atom()\n", - "Si2.add(QE.Position(vector = (0.25, 0.25, 0.26), unit = \"\"))\n", - "SiCell.add(Si)\n", - "Si.add(Si2)\n", - "pretty_print(sim)" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [ - { - "output_type": "error", - "ename": "TypeError", - "evalue": "_run() missing 1 required positional argument: 'simulation'", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" - ] - } - ], - "source": [ - "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})\n", - "pretty_print(sim)" - ] - } - ], - "metadata": {}, - "nbformat": 4, - "nbformat_minor": 2 -} From 500b5920c13aa11e6c56a6f050fa3a2a173990d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Dom=C3=ADnguez?= <43052541+kysrpex@users.noreply.github.com> Date: Fri, 24 Sep 2021 18:20:44 +0200 Subject: [PATCH 15/15] Deleted old quantum espresso file from `master` (#192) --- docs/source/jupyter/quantum-espresso.ipynb | 447 --------------------- 1 file changed, 447 deletions(-) delete mode 100644 docs/source/jupyter/quantum-espresso.ipynb diff --git a/docs/source/jupyter/quantum-espresso.ipynb b/docs/source/jupyter/quantum-espresso.ipynb deleted file mode 100644 index 31b4255..0000000 --- a/docs/source/jupyter/quantum-espresso.ipynb +++ /dev/null @@ -1,447 +0,0 @@ -{ - "metadata": { - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": 3 - }, - "orig_nbformat": 2, - "kernelspec": { - "name": "python_defaultSpec_1597048081738", - "display_name": "Python 3.8.2 64-bit" - } - }, - "nbformat": 4, - "nbformat_minor": 2, - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Tutorial: Quantum Espresso Wrapper\n", - "\n", - "In this tutorial we will go through a simple example of how to use the wrapper for the Quantum Espresso simulation engine.\n", - "You can find the wrapper [here](https://github.com/simphony/quantum-espresso-wrapper).\n", - "\n", - "## Background\n", - "This is an example of a slightly different design based upon the input-output functionality of certain simulation engines such as Quantum Espresso and Gromacs.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Let's get hands-on\n", - "### Installation\n", - "To run the local installation of Quantum Espresso, simply run `./install_engine.sh`. This should check for the prerequisites and compile the code for Quantum Espresso for you.\n", - "\n", - "If the script runs into an error finding openmpi-bin or something like that, try running `apt-get update` and try again. \n", - "Once the installation has completed, try running `pw.x` to see if the installation has succeeded. If this does not work, then try adding `export PATH=$PATH:/home/username/qe-6.1/bin/` at the end of `.bashrc` located at your home folder. \n", - " \n", - "Once you have verified that `pw.x` works, install the ontology via `pico install ontology.simlammps.yml`, and make sure to run `python3 setup.py` located in the root of the quantum espresso wrapper folder. \n", - "\n", - "That should be all needed to use Quantum Espresso!\n", - "\n", - "### Simple example\n", - "\n", - "This is an adaptation of quantum-espresso-wrapper/examples/Simple.py. As usual, we need to import the necessary components:" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np \n", - "\n", - "from osp.core.namespaces import QE\n", - "from osp.core.utils import pretty_print\n", - "from osp.wrappers.quantumespresso.qe_session import qeSession" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, we create simulation and its K points, which determine at what points it samples the cell" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "sim = QE.Simulation()\n", - "k = QE.K_POINTS(vector = (7, 7, 7), unit = \"\")\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, we create a cell, the element Silicon, a pseudopotential, an atom and the cell parameters. Note that the pseudopotential files should ALWAYS be located inside of a folder named `$PSEUDO_DIR` inside of wherever you are running the simulation." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "SiCell = QE.Cell()\n", - "Si = QE.Element(name = \"Si\")\n", - "SiPseudo = QE.PSEUDOPOTENTIAL(name = \"Si.pbe-n-kjpaw_psl.1.0.0.UPF\")\n", - "Si1 = QE.Atom()\n", - "SiParams = QE.CellParams()\n", - "celldm1 = QE.Celldm1(value = 5.43070, unit = \"au\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, we connect these all to each other using the `add` method." - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "" - }, - "metadata": {}, - "execution_count": 4 - } - ], - "source": [ - "Si.add(SiPseudo, Si1)\n", - "Si.add(QE.Mass(value = 28.085, unit = \"amu\"))\n", - "SiCell.add(Si1, SiParams)\n", - "Si1.add(QE.Position(vector = (0, 0, 0), unit = \"\"))\n", - "SiCell.add(celldm1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We specify the cell parameters:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "[,\n ,\n ]" - }, - "metadata": {}, - "execution_count": 5 - } - ], - "source": [ - "SiParams.add(QE.CellParameterX(vector = (0.5, 0.5, 0), unit = \"\"),\n", - " QE.CellParameterY(vector = (0.5, 0, 0.5), unit = \"\"),\n", - " QE.CellParameterZ(vector = (0, 0.5, 0.5), unit = \"\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "And then we add everything created so far to the simulation:\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "" - }, - "metadata": {}, - "execution_count": 6 - } - ], - "source": [ - "sim.add(SiCell)\n", - "sim.add(Si)\n", - "sim.add(k)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "While we're add it, let's add some variables to the simulation which we can check to see if they have been updated. They will not be taken into account when simulating, so they're there for control purposes.\n" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": "" - }, - "metadata": {}, - "execution_count": 7 - } - ], - "source": [ - "sim.add(QE.Pressure(value = 100, unit = \"kbar\"))\n", - "sim.add(QE.StressTensor(tensor2 = np.zeros((3, 3)), unit = \"kbar\"))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's check out what this simulation looks like now with the `pretty_print` function:" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" - } - ], - "source": [ - "pretty_print(sim)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, it's time to get the simulation running:" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "Running calculation...\n/mnt/c/iwm/docs/si.pwscf.in\npw.x -i /mnt/c/iwm/docs/si.pwscf.in > /mnt/c/iwm/docs/si.pwscf.out\n" - } - ], - "source": [ - "session = qeSession()\n", - "quantum_espresso_wrapper = QE.QEWrapper(session = session)\n", - "quantum_espresso_wrapper.add(sim)\n", - "print(\"Running calculation...\")\n", - "\n", - "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"scf\", root = \"\", CONTROL = {'pseudo_dir': \"'.'\"})" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now let's check the results of our calculation:" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 15c6637e-9124-44dd-a1d3-f225203c1bfc\n . path: /mnt/c/iwm/docs/si.pwscf.out\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" - } - ], - "source": [ - "pretty_print(sim)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As you can see, the original part of the cuds tree is still there, with everything mostly the same. The new parts are:\n", - "\n", - "- The qe.PwOut cuds object. This is the output file of the simulation, in case there is something that the wrapper does not parse but that you would still like to see.\n", - "- The qe.TotalEnergy cuds object. This was parsed from the qe.PwOut file itself.\n", - "- The qe.Force cuds object. This represents the force exerted on the atom(s).\n", - "\n", - "The updated parts are:\n", - "\n", - "- The qe.Pressure cuds object, having changed in value from 100 kbar to 5723.64 kbar.\n", - "- The qe.StressTensor cuds object, which is no longer zero." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's see if we can do better and calculate some bands structures:" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "output_type": "error", - "ename": "TypeError", - "evalue": "_run() missing 1 required positional argument: 'simulation'", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" - ] - } - ], - "source": [ - "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"pw.x\", calculation_type = \"bands\")\n", - "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"bands.x\", calculation_type = \"\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Although the cuds structure won't have changed much by this, the data is there in the folder.\n", - "\n", - "Now let's try to relax this cell. While it isn't a real cell, we can still perform the calculations to relax it to know what the movement of the atoms would be like if it were a real cell (warning, perform vc-relax type calculations with caution. These examples are designed to be lightweight and non-indicative of real-world applications)." - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [ - { - "output_type": "error", - "ename": "TypeError", - "evalue": "_run() missing 1 required positional argument: 'simulation'", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" - ] - } - ], - "source": [ - "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": "- Cuds object:\n uuid: 90361daa-6905-4566-979e-11b3b0dd4e85\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: f7548873-28e9-4d76-86da-6fddb687d29e\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 48d4483b-7c72-4454-8041-581dc73fd216\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: 9d61e990-2509-474b-935e-618ca11bb40d\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: f2655054-efa7-4b39-9f0a-cf6453be68ec\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: 55647575-ea8f-4ef7-aee8-2a3333a4ec71\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 92be9c63-ee80-46d9-8853-ccb562e94a5b\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . . uuid: db776c65-9d2e-448e-bc55-5fe0f9c7ee75\n . . unit: au\n . . value: 5.4307\n . - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . (already printed)\n . - qe.Atom cuds object:\n . . uuid: c2094a19-8769-4298-a50a-be1f8befe5bf\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 4087ce47-16f0-4449-b8c4-4577e6d265e2\n . . vector: [0.25 0.25 0.26]\n . . unit: \n . - qe.Mass cuds object:\n . . uuid: 5d57a768-d315-4f91-84a8-fcfad9aae382\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: ab064983-5cc9-418e-a9e7-3357c04388f5\n - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . (already printed)\n - qe.K_POINTS cuds object:\n . uuid: 38385f3b-128c-491f-91f4-44de15055d56\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: 57f47fa8-4588-488f-8c89-fa8a0f37f567\n . unit: kbar\n . value: 100.0\n - qe.Pressure cuds object:\n . uuid: beac6977-01cf-4b4d-b89b-1b4d4eecf5c0\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 7890c86c-9f6f-42b3-a02c-cd57f5307c75\n . path: si.pwscf.out\n - qe.PwOut cuds object:\n . uuid: 5c7e31f9-6e55-4ddf-af62-5a3e58811464\n . path: si.pwscf.out\n - qe.StressTensor cuds object:\n . uuid: 16b33d51-0f6d-4451-a919-da494a13082f\n . unit: kbar\n . tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n - qe.StressTensor cuds object:\n uuid: 590ad64e-d110-4711-90c6-0986bb53dafc\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" - } - ], - "source": [ - "pretty_print(sim)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In this example, the position hasn't changed. So let's spice things up a little bit and add another atom, and then relax:" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "tags": [] - }, - "outputs": [ - { - "output_type": "error", - "ename": "ValueError", - "evalue": " is already in the container", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mSi2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAtom\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mSi2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPosition\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvector\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.26\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0munit\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mSiCell\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mSi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/mnt/c/IWM/osp-core-3.4.0-dev/osp/core/cuds.py\u001b[0m in \u001b[0;36madd\u001b[0;34m(self, rel, *args)\u001b[0m\n\u001b[1;32m 161\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrel\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muid\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mrel\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[0mmessage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'{!r} is already in the container'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 163\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 164\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 165\u001b[0m \u001b[0marg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recursive_store\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mold_objects\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mValueError\u001b[0m: is already in the container" - ] - } - ], - "source": [ - "Si2 = QE.Atom()\n", - "Si2.add(QE.Position(vector = (0.25, 0.25, 0.26), unit = \"\"))\n", - "SiCell.add(Si)\n", - "Si.add(Si2)\n", - "pretty_print(sim)" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [ - { - "output_type": "error", - "ename": "TypeError", - "evalue": "_run() missing 1 required positional argument: 'simulation'", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" - ] - } - ], - "source": [ - "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})\n", - "pretty_print(sim)" - ] - } - ], - "metadata": {}, - "nbformat": 4, - "nbformat_minor": 2 -}