From 6a518b9692521c49aaf70f7c971c29c6a6ca54b2 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Fri, 2 Aug 2024 10:18:23 +0200 Subject: [PATCH 1/2] fix: switched to cheminf studio ws API --- .env.example | 2 +- app/Console/Commands/SanitizeMolecules.php | 2 +- app/Jobs/ArchiveStudy.php | 2 +- resources/js/Pages/Study/About.vue | 2 +- resources/js/Pages/Upload.vue | 4 ++-- resources/js/Shared/SpectraEditor.vue | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index e9a71787..3024f02f 100644 --- a/.env.example +++ b/.env.example @@ -14,7 +14,7 @@ EUROPEMC_WS_API=https://www.ebi.ac.uk/europepmc/webservices/rest/search ORCID_ID_SEARCH_API=https://pub.orcid.org/v2.1/search ORCID_ID_EMPLOYMENT_API=https://pub.orcid.org/v3.0/{orcid_id}/employments ORCID_ID_PERSON_API=https://pub.orcid.org/v3.0/{orcid_id}/person -CM_API=https://api.naturalproducts.net/latest/ +CM_API=https://api.cheminf.studio/latest/ CROSSREF_API=https://api.crossref.org/works/ DATACITE_API=https://api.datacite.org/ diff --git a/app/Console/Commands/SanitizeMolecules.php b/app/Console/Commands/SanitizeMolecules.php index 45e576ed..ed6f4b7c 100644 --- a/app/Console/Commands/SanitizeMolecules.php +++ b/app/Console/Commands/SanitizeMolecules.php @@ -111,7 +111,7 @@ protected function fetchCAS($smiles) protected function standardizeMolecule($mol) { try { - $response = Http::post('https://api.naturalproducts.net/latest/chem/standardize', $mol); + $response = Http::post('https://api.cheminf.studio/latest/chem/standardize', $mol); return $response->json(); } catch (\Illuminate\Http\Client\ConnectionException $e) { diff --git a/app/Jobs/ArchiveStudy.php b/app/Jobs/ArchiveStudy.php index 8f47accd..fb5b8496 100644 --- a/app/Jobs/ArchiveStudy.php +++ b/app/Jobs/ArchiveStudy.php @@ -196,7 +196,7 @@ public function handle(): void // protected function standardizeMolecule($mol) // { - // $response = Http::post('https://dev.api.naturalproducts.net/latest/chem/standardize', $mol); + // $response = Http::post('https://api.cheminf.studio/latest/chem/standardize', $mol); // return $response->json(); // } diff --git a/resources/js/Pages/Study/About.vue b/resources/js/Pages/Study/About.vue index 33713145..9042bab8 100644 --- a/resources/js/Pages/Study/About.vue +++ b/resources/js/Pages/Study/About.vue @@ -735,7 +735,7 @@ export default { }, standardizeMolecules(mol) { return axios.post( - "https://api.naturalproducts.net/latest/chem/standardize", + "https://api.cheminf.studio/latest/chem/standardize", mol ); }, diff --git a/resources/js/Pages/Upload.vue b/resources/js/Pages/Upload.vue index 9a3cfc2d..1db89b4e 100644 --- a/resources/js/Pages/Upload.vue +++ b/resources/js/Pages/Upload.vue @@ -2519,7 +2519,7 @@ export default { }, standardizeMolecules(mol) { return axios.post( - "https://api.naturalproducts.net/latest/chem/standardize", + "https://api.cheminf.studio/latest/chem/standardize", mol ); }, @@ -2547,7 +2547,7 @@ export default { // convert to smiles axios .post( - "https://dev.api.naturalproducts.net/latest/chem/standardize", + "https://api.cheminf.studio/latest/latest/chem/standardize", response.data ) .then((res) => { diff --git a/resources/js/Shared/SpectraEditor.vue b/resources/js/Shared/SpectraEditor.vue index 75fbcd94..f421a6a0 100644 --- a/resources/js/Shared/SpectraEditor.vue +++ b/resources/js/Shared/SpectraEditor.vue @@ -385,7 +385,7 @@ export default { mol = this.fixLineError(mol); axios .post( - "https://api.naturalproducts.net/latest/chem/standardize", + "https://api.cheminf.studio/latest/chem/standardize", mol.molfile ) .then((res) => { From 1e2f8e2ef9228ade5939cd9882b1ace4a4e0a282 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Fri, 2 Aug 2024 10:54:17 +0200 Subject: [PATCH 2/2] fix: switched to cdk for 2d rendering --- resources/js/Shared/Depictor2D.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/Shared/Depictor2D.vue b/resources/js/Shared/Depictor2D.vue index ae37203e..42cc246f 100644 --- a/resources/js/Shared/Depictor2D.vue +++ b/resources/js/Shared/Depictor2D.vue @@ -18,7 +18,7 @@ width + '&CIP=' + CIP + - '&toolkit=rdkit' + '&toolkit=cdk' " alt="" />