From cbe06414ee38768e8b4727837bc4b596d621bd89 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Tue, 6 Jun 2023 12:16:01 +0200 Subject: [PATCH 01/14] Add `bonds` for structure type entries. --- optimade.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/optimade.rst b/optimade.rst index 2947c3fcf..0fc070a43 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2833,6 +2833,26 @@ assemblies These two sites are correlated (either site 2 or 3 is present). However, the presence or absence of sites 0 and 1 is not correlated with the presence or absence of sites 2 and 3 (in the specific example, the pair of sites (0, 2) can occur with 0.2\*0.3 = 6 % probability; the pair (0, 3) with 0.2\*0.7 = 14 % probability; the pair (1, 2) with 0.8\*0.3 = 24 % probability; and the pair (1, 3) with 0.8\*0.7 = 56 % probability). +bonds +~~~~~ + +- **Description**: A list describing the chemical connectivity in the structure. +- **Type**: list of dictionary with keys: + + - :property:`sites`: a list of integers (REQUIRED) + +- **Requirements/Conventions**: + + - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`. + - **Query**: Support for queries on this property is OPTIONAL. + If supported, filters MAY support only a subset of comparison operators. + - The property SHOULD be :val:`null` for structures for which the bond perception has not been carried out by the implementation. + - :property:`sites` inside each dictionary contains two integers refering to different sites which are deemed chemically connected. + +- **Examples**: + + - :val:`[ {"sites": [1, 2]} ]`: a structure with a bond between sites 1 and 2. + structure\_features ~~~~~~~~~~~~~~~~~~~ From 1478145e496677d6596d8c47edc3f6b5fae2762d Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Wed, 7 Jun 2023 15:56:26 +0200 Subject: [PATCH 02/14] Reformulate the meaning of `null`. --- optimade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 0fc070a43..f129b2370 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2846,7 +2846,7 @@ bonds - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`. - **Query**: Support for queries on this property is OPTIONAL. If supported, filters MAY support only a subset of comparison operators. - - The property SHOULD be :val:`null` for structures for which the bond perception has not been carried out by the implementation. + - The property SHOULD be :val:`null` for structures for which the chemical connectivity is unknown to the implementation. - :property:`sites` inside each dictionary contains two integers refering to different sites which are deemed chemically connected. - **Examples**: From 9502864ee3cb96e8569fcc7a8a8963689ba38726 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Wed, 7 Jun 2023 15:57:35 +0200 Subject: [PATCH 03/14] Update optimade.rst Co-authored-by: Antanas Vaitkus --- optimade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index f129b2370..2b0860fd0 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2836,7 +2836,7 @@ assemblies bonds ~~~~~ -- **Description**: A list describing the chemical connectivity in the structure. +- **Description**: A list describing the chemical connectivity of the structure. - **Type**: list of dictionary with keys: - :property:`sites`: a list of integers (REQUIRED) From 5460c5abc150397006eefd4cdb0f54b29925a38f Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Wed, 7 Jun 2023 15:58:02 +0200 Subject: [PATCH 04/14] Update optimade.rst Co-authored-by: Antanas Vaitkus --- optimade.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 2b0860fd0..87bc81684 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2847,7 +2847,8 @@ bonds - **Query**: Support for queries on this property is OPTIONAL. If supported, filters MAY support only a subset of comparison operators. - The property SHOULD be :val:`null` for structures for which the chemical connectivity is unknown to the implementation. - - :property:`sites` inside each dictionary contains two integers refering to different sites which are deemed chemically connected. + - If present, it MUST be a list of dictionaries, each of which represents a chemical bond and MUST have the following key: + - *sites*: 0-based indexes of the two sites that form a chemical bond. - **Examples**: From a49da9e51677bcc08fe224e5f58b55ab79c30ec2 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Wed, 7 Jun 2023 16:01:50 +0200 Subject: [PATCH 05/14] Addressing the ordering of site indexes. --- optimade.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index f129b2370..32dafd116 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2847,7 +2847,8 @@ bonds - **Query**: Support for queries on this property is OPTIONAL. If supported, filters MAY support only a subset of comparison operators. - The property SHOULD be :val:`null` for structures for which the chemical connectivity is unknown to the implementation. - - :property:`sites` inside each dictionary contains two integers refering to different sites which are deemed chemically connected. + - :property:`sites` inside each dictionary contains two integers refering to sites which are deemed chemically connected. + The site indexes MUST be ordered in non-decreasing manner. - **Examples**: From 7bf9f2bffc9903be42a36bf241bd3d58f752f53d Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Wed, 7 Jun 2023 16:06:09 +0200 Subject: [PATCH 06/14] Adding a missing empty line. --- optimade.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/optimade.rst b/optimade.rst index 51efd24e5..9e324650e 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2848,6 +2848,7 @@ bonds If supported, filters MAY support only a subset of comparison operators. - The property SHOULD be :val:`null` for structures for which the chemical connectivity is unknown to the implementation. - If present, it MUST be a list of dictionaries, each of which represents a chemical bond and MUST have the following key: + - *sites*: an ordered list of 0-based indexes of the two sites that form a chemical bond. - **Examples**: From a448690cd98bf2a6d514bfd3ddfbe230d4bb9924 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Wed, 7 Jun 2023 16:32:08 +0200 Subject: [PATCH 07/14] Add means to define translation vectors. --- optimade.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/optimade.rst b/optimade.rst index 9e324650e..99b560d08 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2840,6 +2840,7 @@ bonds - **Type**: list of dictionary with keys: - :property:`sites`: a list of integers (REQUIRED) + - :property:`translations`: a list of list of integers (OPTIONAL) - **Requirements/Conventions**: @@ -2851,9 +2852,15 @@ bonds - *sites*: an ordered list of 0-based indexes of the two sites that form a chemical bond. + - If translations are needed by at least one of the sites of a bond, the following key SHOULD be used: + + - *translations*: a list of two lists of three integers each, defining translations of the sites. + Omitting this key means that both translation vectors are :val:`[0, 0, 0]`. + - **Examples**: - :val:`[ {"sites": [1, 2]} ]`: a structure with a bond between sites 1 and 2. + - :val:`[ {"sites": [1, 1], "translations": [ [0, 0, 0], [0, 0, 1] ]} ]`: a 1D polymer. structure\_features ~~~~~~~~~~~~~~~~~~~ From 6bfa2062c8ca59bf6a53ecfc27643f1e0d619d05 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Wed, 7 Jun 2023 17:39:50 +0200 Subject: [PATCH 08/14] Update optimade.rst Co-authored-by: Antanas Vaitkus --- optimade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 99b560d08..2ec943366 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2850,7 +2850,7 @@ bonds - The property SHOULD be :val:`null` for structures for which the chemical connectivity is unknown to the implementation. - If present, it MUST be a list of dictionaries, each of which represents a chemical bond and MUST have the following key: - - *sites*: an ordered list of 0-based indexes of the two sites that form a chemical bond. + - *sites*: a non-decreasing list of 0-based indexes of the two sites that form a chemical bond. - If translations are needed by at least one of the sites of a bond, the following key SHOULD be used: From e4b870cf1d92482b816c5f6fc09542696f2e68f1 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Thu, 8 Jun 2023 09:53:09 +0200 Subject: [PATCH 09/14] Sites are 0-based integers. --- optimade.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optimade.rst b/optimade.rst index 99b560d08..d289527e8 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2859,8 +2859,8 @@ bonds - **Examples**: - - :val:`[ {"sites": [1, 2]} ]`: a structure with a bond between sites 1 and 2. - - :val:`[ {"sites": [1, 1], "translations": [ [0, 0, 0], [0, 0, 1] ]} ]`: a 1D polymer. + - :val:`[ {"sites": [0, 1]} ]`: a structure with a bond between sites 1 and 2. + - :val:`[ {"sites": [0, 0], "translations": [ [0, 0, 0], [0, 0, 1] ]} ]`: a 1D polymer. structure\_features ~~~~~~~~~~~~~~~~~~~ From d0ab465ac642fdb7b371206403c168d083c73722 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Thu, 8 Jun 2023 09:53:47 +0200 Subject: [PATCH 10/14] Adjust example description. --- optimade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 1b8cba6aa..1cb6f48ae 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2859,7 +2859,7 @@ bonds - **Examples**: - - :val:`[ {"sites": [0, 1]} ]`: a structure with a bond between sites 1 and 2. + - :val:`[ {"sites": [0, 1]} ]`: a structure with a bond between sites 0 and 1. - :val:`[ {"sites": [0, 0], "translations": [ [0, 0, 0], [0, 0, 1] ]} ]`: a 1D polymer. structure\_features From 0b0326af063ac4c3ee2fc89061415a191c307309 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Thu, 8 Jun 2023 10:01:48 +0200 Subject: [PATCH 11/14] Update optimade.rst Co-authored-by: Matthew Evans <7916000+ml-evs@users.noreply.github.com> --- optimade.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 1cb6f48ae..16a4ad5b8 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2856,7 +2856,8 @@ bonds - *translations*: a list of two lists of three integers each, defining translations of the sites. Omitting this key means that both translation vectors are :val:`[0, 0, 0]`. - + - *distance*: the distance in Angstrom between the two sites after applying the appropriate translation vectors. + - **Examples**: - :val:`[ {"sites": [0, 1]} ]`: a structure with a bond between sites 0 and 1. From b682c70f8cbd1545c53ebe8abbe87a3fa49ea153 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Thu, 8 Jun 2023 10:08:15 +0200 Subject: [PATCH 12/14] Slightly modifying the addition from @ml-evs --- optimade.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 16a4ad5b8..91acbd643 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2841,6 +2841,7 @@ bonds - :property:`sites`: a list of integers (REQUIRED) - :property:`translations`: a list of list of integers (OPTIONAL) + - :property:`distance`: float (OPTIONAL) - **Requirements/Conventions**: @@ -2856,7 +2857,8 @@ bonds - *translations*: a list of two lists of three integers each, defining translations of the sites. Omitting this key means that both translation vectors are :val:`[0, 0, 0]`. - - *distance*: the distance in Angstrom between the two sites after applying the appropriate translation vectors. + + - OPTIONAL key :property:`distance` MAY be used to provide distance in ångström (Å) between the two sites after applying the appropriate translation vectors. - **Examples**: From 7c1102bf483abc8f74df4d7cbb3c1f95a6601860 Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Thu, 8 Jun 2023 10:11:30 +0200 Subject: [PATCH 13/14] Remove trailing whitespace. --- optimade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 91acbd643..ba8a461b0 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2859,7 +2859,7 @@ bonds Omitting this key means that both translation vectors are :val:`[0, 0, 0]`. - OPTIONAL key :property:`distance` MAY be used to provide distance in ångström (Å) between the two sites after applying the appropriate translation vectors. - + - **Examples**: - :val:`[ {"sites": [0, 1]} ]`: a structure with a bond between sites 0 and 1. From e4ac0cca66d129a9f10ccfc70b10f9bb71425c6f Mon Sep 17 00:00:00 2001 From: Andrius Merkys Date: Thu, 8 Jun 2023 10:46:14 +0200 Subject: [PATCH 14/14] Update optimade.rst Co-authored-by: Antanas Vaitkus --- optimade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index ba8a461b0..7db8d4f9f 100644 --- a/optimade.rst +++ b/optimade.rst @@ -2858,7 +2858,7 @@ bonds - *translations*: a list of two lists of three integers each, defining translations of the sites. Omitting this key means that both translation vectors are :val:`[0, 0, 0]`. - - OPTIONAL key :property:`distance` MAY be used to provide distance in ångström (Å) between the two sites after applying the appropriate translation vectors. + - OPTIONAL key :property:`distance` MAY be used to provide the distance in ångströms (Å) between the two sites after applying the appropriate translation vectors. - **Examples**: