Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New biomol fields #400

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions optimade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2465,6 +2465,156 @@ Relationships with calculations MAY be used to indicate provenance where a struc
Appendices
==========

Domain Specific Fields
----------------------

The fields below are all optional and are only used within specific research fields.

Every field has a standard domain-specific prefix.


biomol_chains
~~~~~~~~~~~~~

- **Description**: For each chain in the system there is a dictionary that describes this chain. Chains are groups of related residues (e.g. a polymer).
Databases are allowed to add more properties as long as the properties are prefixed with the database specific prefix.
- **Type**: list of dictionaries with the properties:
- :property:`name`: string (REQUIRED)
- :property:`residues`: list of integers (REQUIRED)
- :property:`types`: list of strings
- :property:`sequences`: list of strings
- :property:`sequence_types`: list of strings
- **Requirements/Conventions**:
- **Query**: Support for queries on this property is OPTIONAL.
If supported, only a subset of the filter features MAY be supported.
- **name**: The chain name/letter.
- **residues**: A list of integers referring to the index of :field:`biomol_residues`, that belong to this chain.
The list SHOULD NOT be empty. The index of the first residue is 0.
- **types**: A list of tags/labels specifying the type of molecules this chain contains (e.g. 'protein').
This field is useful as an overview of every chain and as a query target for the structure.
Standard labels for this field are the follwoing: 'protein', 'nucleic acid', 'carbohydrates', 'lipid', 'membrane', 'ligand', 'ion', 'solvent' and 'other'.
The list SHOULD contain values within the standard labels.
Additional custom labels MAY be used. These labels MUST include the database-provider-specific prefix with the following format: <prefix>:<label>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add a custom label to the example.

- **sequences**: A list of residue sequences in current chain.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the same sequence occurs twice in a chain. Should the sequence be listed here twice or just once?

- **sequence_types**: A list of tags specifying the type of each sequence in the :property:`sequences` field. The type of a sequence is defined by its components (e.g. 'aminoacids').
- There SHOULD NOT be two or more chains with the same :property:`name`.
- Values in :property:`name` SHOULD be in capital letters.
- Values in :property:`name` SHOULD NOT be longer than 1 character when the number of chains is not greater than the number of letters in English alphabet (26).
- Values in :property:`sequences` SHOULD be in capital letters.
- Number of values in :property:`sequences` and :property:`sequence_types` MUST match.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add here that the order of the values should also be the same.

Suggested change
- Number of values in :property:`sequences` and :property:`sequence_types` MUST match.
- The number of values and their order in :property:`sequences` and :property:`sequence_types` MUST match.


- **Examples**:

.. code:: jsonc
{
"biomol_chains":[
{
"name": "A",
"residues":[0,1,2,3, ...],
"types": ['protein', 'ions'],
"sequences": ['MSHHWGYG'],
"sequence_types": ['aminoacids']
},
{
"name": "B",
"residues":[54,55,56,57, ...],
"types": ['nucleic acid'],
"sequences": ['GATTACA'],
"sequence_types": ['nucleotides']
},
]
}

biomol_residues
JPBergsma marked this conversation as resolved.
Show resolved Hide resolved
~~~~~~~~~~~~~~~

- **Description**: For each residue in the system there is a dictionary that describes this residue. Residues are groups of related atoms (e.g. an aminoacid).
Databases are allowed to add more properties as long as the properties are prefixed with the database specific prefix.
- **Type**: list of dictionaries with the properties:
- :property:`name`: string (REQUIRED)
- :property:`number`: integer (REQUIRED)
- :property:`insertion_code`: string or null (REQUIRED)
d-beltran marked this conversation as resolved.
Show resolved Hide resolved
- :property:`sites`: list of integers (REQUIRED)
- **Requirements/Conventions**:
- **Query**: Support for queries on this property is OPTIONAL.
If supported, only a subset of the filter features MAY be supported.
- **name**: The residue name
- **number**: The residue number according to source notation.
- **insertion_code**: The residue insertion code. It MUST NOT be longer than 1 character. It MAY be null.
- **sites**: A list of integers referring to the index of :field:`cartesian_site_positions`, that belong to this residue.
The list SHOULD NOT be empty. The index of the first site is 0.
- There MUST NOT be two or more residues with the same integer in :property:`sites`.
d-beltran marked this conversation as resolved.
Show resolved Hide resolved
- All :property:`name` and :property:`insertion_code` values SHOULD be in capital letters.

- **Examples**:

.. code:: jsonc
{
"biomol_residues":[
{
"name": "PHE",
"number": 17,
"insertion_code": null,
"sites":[0,1,2,3, ...]
},
{
"name": "ASP",
"number": 18,
"insertion_code": null,
"sites":[17,18,19,20, ...]
},
{
"name": "LEU",
"number": 18,
"insertion_code": "A",
"sites":[29,30,31, ...]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "PHE",
"number": 17,
"insertion_code": null,
"sites":[0,1,2,3, ...]
},
{
"name": "ASP",
"number": 18,
"insertion_code": null,
"sites":[17,18,19,20, ...]
},
{
"name": "LEU",
"number": 18,
"insertion_code": "A",
"sites":[29,30,31, ...]
"name": "PHE",
"number": 17,
"insertion_code": null,
"sites":[0,1,2,3, ...]
},
{
"name": "ASP",
"number": 18,
"insertion_code": null,
"sites":[17,18,19,20, ...]
},
{
"name": "LEU",
"number": 18,
"insertion_code": "A",
"sites":[29,30,31, ...]

For me the indentation levels were not consistent so I try to correct them here.

},
]
}

biomol_sequences
~~~~~~~~~~~~~~~~

- **Description**: A list of residue sequences in current structure. It may be any type of sequence, as this type is further specified in :field:`biomol_sequence_types`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you not duplicating data here? It seems that the sequences already occur in the biomol_chains field. It would perhaps be better to make a reference from the biomol_chains to these sequences.

Is the main point of this field not to enable querying on the sequences?
If that is the case, it may be better to set the query ability to SHOULD.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, data would be duplicated.

I was thinking that it could be better specifying which chains (and even which residues) are included on each sequence, by their indices, and then removing the sequences and sequence_types fields on biomol_chains.

Actually, instead of making new fields for this we could reshape sequences like a list of dictionaries, to make it coherent with the other biomol field formats. What do you think?

biomol_sequences
~~~~~~~~~~~~~~~~

- **Description**: A list of residue sequences in current structure.
 Every sequence is a dictionary which includes the sequence itself and the type of sequence it is.
 Every sequence may include a list of chain and residue indices.
 Sequences may be grouped and ordered in any form (e.g. by chains, by fragments of covalently bonded atoms, etc.) as long as they make sense when querying structures by sequence.
- **Type**: list of dictionaries with the properties:
   - :property:`sequence`: string (REQUIRED)
   - :property:`type`: string (REQUIRED)
   - :property:`chains`: list of integers
   - :property:`residues`: list of integers
- **Requirements/Conventions**:
   - **Query**:  Queries on this property SHOULD be supported.
   - **sequence**: A string with a letter for each residue in the sequence. Letters SHOULD be capital letters.
   - **type**: The type of a sequence is defined by its components (e.g. 'aminoacids').
   - **chains**: A list of integers referring to indices in :field:`biomol_chains` for chains which include this sequence totally or partially.
   - **residues**: A list of integers referring to indices in :field:`biomol_residues` for residues included in the sequence.
   Indices start the count at 0.
   There MUST NOT be repeated indices both in :property:`chains` and :property:`residues`.



- **Examples**:

.. code:: jsonc
  {
    "biomol_sequences":[
      {
        sequence: 'MSHHWGYG',
        type: 'aminoacids'
      },
      {
        sequence: 'GATTACA',
        type: 'nucleotides'
      }
    ]
  }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could indeed turn the sequences into a dictionary.

I was still wondering whether there is a clear hierarchical structure? (That a chain can have one or more sequences, but a sequence can not contain more than one chain? In that case, we would not need to duplicate the residues.

I was also wondering how the situation is handled, where there are multiple chains with the same sequence.
Will there be multiple sequence entries with the same sequence ? My idea was to make a sequence unique, so it only occurs once in the biomol_sequence field. But if you include the residues, you would need to have a separate sequence entry for each chain.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was still wondering whether there is a clear hierarchical structure? (That a chain can have one or more sequences, but a sequence can not contain more than one chain? In that case, we would not need to duplicate the residues.

In my previous suggestion the chains property is a list of integers so a sequence may contain more than one chain. This is important since a polymer may be splitted in several chains. In the other hand, a chain may contain the whole sequence of a polymer and more things at the same time, so not all residues in the chain would be part of the sequence. Then listing residues in the chain makes sense.

I was also wondering how the situation is handled, where there are multiple chains with the same sequence.
Will there be multiple sequence entries with the same sequence ? My idea was to make a sequence unique, so it only occurs once in the biomol_sequence field. But if you include the residues, you would need to have a separate sequence entry for each chain.

I did not think about this and you are right. Then we can forget about residues to make everything easier.

Sequences may be grouped and ordered in any form (e.g. by chains, by fragments of covalently bonded atoms, etc.) as long as they make sense when querying structures by sequence.
- **Type**: list of strings
- **Requirements/Conventions**:
- **Query**: Support for queries on this property is OPTIONAL.
- There MUST be the same number of values that in :field:`biomol_sequence_types`.
- Values SHOULD be in capital letters.

- **Examples**:

.. code:: jsonc
{
"biomol_sequences":[
'MSHHWGYG',
'GATTACA'
]
}


biomol_sequence_types
~~~~~~~~~~~~~~~~~~~~~

- **Description**: A list of tags specifying the type of each sequence in the :field:`biomol_sequences` field.
The type of a sequence is defined by its components (e.g. 'aminoacids').
- **Type**: list of strings
- **Requirements/Conventions**:
- **Query**: Support for queries on this property is OPTIONAL.
- There MUST be the same number of values that in :field:`biomol_sequences`.

- **Examples**:

.. code:: jsonc
{
"biomol_sequence_types":[
'aminoacids',
'nucleotides'
]
}


The Filter Language EBNF Grammar
--------------------------------

Expand Down