Open iwwwish opened 3 years ago
Hi,
I suppose the issue is with the URLs in the getMoleculeFromCAS(String cas) method in InsertTextPanel.java. As NCBI switched to HTTPS, this method now returns null. I could get the method working with the following changes:
null
Edit 1: String firstURL = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pccompound&term=" + cas; (change to https)
String firstURL = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pccompound&term=" + cas;
Edit 2: Pattern pattern = Pattern.compile("http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi\\?cid=(\\d*)"); (change the regex string to https://pubchem.ncbi.nlm.nih.gov/compound/(\\d*))
Pattern pattern = Pattern.compile("http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi\\?cid=(\\d*)");
https://pubchem.ncbi.nlm.nih.gov/compound/(\\d*)
Edit 3: String secondURL = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?tool=jcppubchem&db=pccompound&id=" + cid; (change to https)
String secondURL = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?tool=jcppubchem&db=pccompound&id=" + cid;
Edit 4: pattern = Pattern.compile("<Item Name=\"CanonicalSmile\" Type=\"String\">([^\\s]*?)</Item>"); (change CanonicalSmile to CanonicalSmiles)
pattern = Pattern.compile("<Item Name=\"CanonicalSmile\" Type=\"String\">([^\\s]*?)</Item>");
CanonicalSmile
CanonicalSmiles
Is it possible to release a new version of jchempaint-hotfix-3.4.jar? I would like to use the sketcher panel in the development of a new KNIME node.
Thank you, Vishal
Hi,
I suppose the issue is with the URLs in the getMoleculeFromCAS(String cas) method in InsertTextPanel.java. As NCBI switched to HTTPS, this method now returns
null
. I could get the method working with the following changes:Edit 1:
String firstURL = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pccompound&term=" + cas;
(change to https)Edit 2:
Pattern pattern = Pattern.compile("http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi\\?cid=(\\d*)");
(change the regex string tohttps://pubchem.ncbi.nlm.nih.gov/compound/(\\d*)
)Edit 3:
String secondURL = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?tool=jcppubchem&db=pccompound&id=" + cid;
(change to https)Edit 4:
pattern = Pattern.compile("<Item Name=\"CanonicalSmile\" Type=\"String\">([^\\s]*?)</Item>");
(changeCanonicalSmile
toCanonicalSmiles
)Is it possible to release a new version of jchempaint-hotfix-3.4.jar? I would like to use the sketcher panel in the development of a new KNIME node.
Thank you, Vishal