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

Adding the trajectories endpoint to OPTIMADE #377

Open
wants to merge 69 commits into
base: develop
Choose a base branch
from

Conversation

JPBergsma
Copy link
Contributor

@JPBergsma JPBergsma commented Jul 21, 2021

During the OPTIMADE meeting in June 2021, we discussed in room 2 how the OPTIMADE standard could be expanded to allow the sharing of trajectory data. Based on the discussions with amongst others @giovannipizzi, @gmrigna, Adam Hospital, Tristan Bereau, Amit Gupta, Corey Oses, Ellad Tadmor, Maithilee Motlag, and Daniel S Karls, I have written a first draft for adding a trajectory endpoint. This will hopefully be a good base for further discussion.

The PR adds a trajectories section (in this PR section 7.3), that defines how a client can query and retrieve data from trajectories and how the server can share this data. We have tried to do this in a general way so that many different kinds of trajectories can be shared.

@JPBergsma JPBergsma force-pushed the JPBergsma_add_Trajectories branch 3 times, most recently from 08f1bf7 to b907b2c Compare July 21, 2021 15:15
optimade.rst Outdated Show resolved Hide resolved
@JPBergsma JPBergsma added PR/major-edits type/proposal Proposal for addition/removal of features. May need broad discussion to reach consensus. labels Jul 21, 2021
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Thanks for the hard work on this @JPBergsma!

My comments below are mostly around maintaining our compliance with the JSON:API format.

optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
Placed all sentences on seperate lines.
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
@giovannipizzi
Copy link
Contributor

giovannipizzi commented Sep 9, 2021

Can we add an endpoint for bulk downloads?

JPBergsma and others added 4 commits October 6, 2022 12:59
Co-authored-by: Rickard Armiento <gitcommits@armiento.net>
…t_frame and frame_step parameters for servers.
…gsma/OPTIMADE into JPBergsma_add_Trajectories

# Conflicts:
#	optimade.rst
@rartino rartino mentioned this pull request Dec 19, 2022
@rartino rartino mentioned this pull request Jun 11, 2023
5 tasks
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
@rartino rartino dismissed their stale review January 10, 2024 16:21

No longer relevant, will re-review

optimade.rst Outdated Show resolved Hide resolved
Comment on lines +3136 to +3263
},
{
"name":"H2",
"chemical_symbols":["H"],
"concentration":[1.0]
}
]],
"reference_frames": [1],
"nframes": [360],
"_exmpl_temperature": null,
"_exmpl_ekin": null
},
"meta":{
"property_metadata":{
"cartesian_site_positions":{
"range":{
"indexable_dim": ["frames"],
"data_range": [{
"start": 1,
"step": 1,
"stop": 360,
},{
"start": 1,
"step": 1,
"stop": 3,
},{
"start": 1,
"step": 1,
"stop": 3,
}],
"layout":"dense",
"nvalues": 3240
},
},
"_exmpl_temperature":{
"range": {
"nvalues": 144,
"indexable_dim": ["frames"],
"data_range": [
{
"start": 1,
"stop": 360,
"step": null
}
],
"layout": "sparse"
}
},
"_exmpl_ekin":{
"range": {
"nvalues": 180,
"indexable_dim": ["frames"],
"data_range": [
{
"start": 1,
"stop": 360,
"step": 2
}
],
"layout":"dense",
}
}
},
"partial_data_links": {
"cartesian_site_positions": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/cartesian_site_positions/jsonlines"
},{
"format": "_exmpl_xyz",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/cartesian_site_positions/xyz"
},
],
"_exmpl_temperature": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/temperature/jsonlines"
},
],
"_exmpl_ekin": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/ekin/jsonlines"
},
]
}
},
"relationships": {
"references": {
"data": [
{
"type": "references",
"id": "dummy/2019"
}
]
}
}
}
//...
}
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
{
"data":{
"id": "traj00000001",
"type": "trajectories",
"attributes": {
"last_modified":"2021-07-16T18:02:03Z",
"elements": [["H","O"]],
"nelements": [2],
"elements_ratios": [[0.666667,0.333333]],
"chemical_formula_descriptive": ["H2O"],
"chemical_formula_reduced": ["H2O"],
"chemical_formula_anonymous": ["A2B"],
"dimension_types":[[0,0,0]],
"nperiodic_dimensions": [0],
"lattice_vectors" : [[[4.0,0.0,0.0],[0.0,4.0,0.0],[0.0,0.0,4.0]]],
"cartesian_site_positions" : null,
"nsites":[3],
"species_at_sites":[["O1","H1","H2"]],
"species":[[
{
"name":"O1",
"chemical_symbols":["O"],
"concentration":[1.0]
},
{
"name":"H1",
"chemical_symbols":["H"],
"concentration":[1.0]
},
{
"name":"H2",
"chemical_symbols":["H"],
"concentration":[1.0]
}
]],
"reference_frames": [1],
"nframes": [360],
"_exmpl_temperature": null,
"_exmpl_ekin": null
},
"meta":{
"property_metadata":{
"cartesian_site_positions":{
"range":{
"indexable_dim": ["frames"],
"data_range": [{
"start": 1,
"step": 1,
"stop": 360,
},{
"start": 1,
"step": 1,
"stop": 3,
},{
"start": 1,
"step": 1,
"stop": 3,
}],
"layout":"dense",
"nvalues": 3240
},
},
"_exmpl_temperature":{
"range": {
"nvalues": 144,
"indexable_dim": ["frames"],
"data_range": [
{
"start": 1,
"stop": 360,
"step": null
}
],
"layout": "sparse"
}
},
"_exmpl_ekin":{
"range": {
"nvalues": 180,
"indexable_dim": ["frames"],
"data_range": [
{
"start": 1,
"stop": 360,
"step": 2
}
],
"layout":"dense",
}
}
},
"partial_data_links": {
"cartesian_site_positions": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/cartesian_site_positions/jsonlines"
},{
"format": "_exmpl_xyz",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/cartesian_site_positions/xyz"
},
],
"_exmpl_temperature": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/temperature/jsonlines"
},
],
"_exmpl_ekin": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/ekin/jsonlines"
},
]
}
},
"relationships": {
"references": {
"data": [
{
"type": "references",
"id": "dummy/2019"
}
]
}
}
}
//...
}
{
"data":{
"id": "traj00000001",
"type": "trajectories",
"attributes": {
"last_modified":"2021-07-16T18:02:03Z",
"elements": [["H","O"]],
"nelements": [2],
"elements_ratios": [[0.666667,0.333333]],
"chemical_formula_descriptive": ["H2O"],
"chemical_formula_reduced": ["H2O"],
"chemical_formula_anonymous": ["A2B"],
"dimension_types":[[0,0,0]],
"nperiodic_dimensions": [0],
"lattice_vectors" : [[[4.0,0.0,0.0],[0.0,4.0,0.0],[0.0,0.0,4.0]]],
"cartesian_site_positions" : null,
"nsites":[3],
"species_at_sites":[["O1","H1","H2"]],
"species":[[
{
"name":"O1",
"chemical_symbols":["O"],
"concentration":[1.0]
},
{
"name":"H1",
"chemical_symbols":["H"],
"concentration":[1.0]
},
{
"name":"H2",
"chemical_symbols":["H"],
"concentration":[1.0]
}
]],
"reference_frames": [1],
"nframes": [360],
"_exmpl_temperature": null,
"_exmpl_ekin": null
},
"meta":{
"property_metadata":{
"cartesian_site_positions":{
"range":{
"indexable_dim": ["frames"],
"data_range": [{
"start": 1,
"step": 1,
"stop": 360
},{
"start": 1,
"step": 1,
"stop": 3
},{
"start": 1,
"step": 1,
"stop": 3
}],
"layout":"dense",
"nvalues": 3240
}
},
"_exmpl_temperature":{
"range": {
"nvalues": 144,
"indexable_dim": ["frames"],
"data_range": [
{
"start": 1,
"stop": 360,
"step": null
}
],
"layout": "sparse"
}
},
"_exmpl_ekin":{
"range": {
"nvalues": 180,
"indexable_dim": ["frames"],
"data_range": [
{
"start": 1,
"stop": 360,
"step": 2
}
],
"layout":"dense"
}
}
},
"partial_data_links": {
"cartesian_site_positions": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/cartesian_site_positions/jsonlines"
},{
"format": "_exmpl_xyz",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/cartesian_site_positions/xyz"
}
],
"_exmpl_temperature": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/temperature/jsonlines"
}
],
"_exmpl_ekin": [
{
"format": "jsonlines",
"link": "https://example.org/optimade/v1.2/extensions/partial_data/trajectories/traj00000001/ekin/jsonlines"
}
]
}
},
"relationships": {
"references": {
"data": [
{
"type": "references",
"id": "dummy/2019"
}
]
}
}
}
//...
}

Co-authored-by: Antanas Vaitkus <antanas.vaitkus90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR/major-edits type/proposal Proposal for addition/removal of features. May need broad discussion to reach consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants