6
$\begingroup$

My question is a follow-up question to this question posted by Hemanth Haridas.

I ran the example .py script in Geoff Hutchison's answer for the above mentioned question to generate .png files from .xyz files in avogadro using python.

The script is available here : Script-Github

I ran the script on my local Mac OS. The python script is in the same directory as the .xyz files. This is the output for one file:

Opening mol2.xyz
b'{\n    "id": 0,
\n  "jsonrpc": "2.0",
\n "result": true\n}
\n'
b'{\n "error": 
{\n  "code": -32601,\n  
"data":
 {\n  "request": 
{\n   "id": 0,
\n   "jsonrpc": "2.0",\n                

"method": "saveGraphic",
\n "params": 
{\n                    

"fileName":
"/Users/aimun/
avogadroextract/mol2.png"\n   }
\n   }\n   },\n        

"message":
 "Method not found"\n    },\n   
 "id": 0,\n "jsonrpc": "2.0"\n}\n'

The same error is displayed for all the other .xyz files in the directory.

I have Avogadro 1.97.0 and Avogadro 1.2.0 installed in my mac. When I run the script, I see only the Avogadro 1.97.0 window being updated with the molecule structures, however, the files are not saved as .png.

According to json-rpc 2.0 specification, code: -32601 means 'The method does not exist / is not available'.

Any leads on how to address this will be highly appreciated.

$\endgroup$
3
  • $\begingroup$ Please add which version of Avagadro you are using in the question $\endgroup$ Aug 17, 2023 at 9:51
  • $\begingroup$ Thank you, I have updated the post with the Avogadro version details. $\endgroup$ Aug 17, 2023 at 11:22
  • 3
    $\begingroup$ The answer by Geoff that you linked in the question, mentions that the Avagadro version 1.98. So please upgrade your version to 1.98 and retry since the method could have been added in 1.98. $\endgroup$ Aug 17, 2023 at 12:04

1 Answer 1

2
$\begingroup$

As mentioned in my answer, this is only available in the development version, which will be released as 1.98 soon. So if you're running 1.97 release, the method is not available.

In principal, you can use a nightly build from https://two.avogadro.cc

I would suggest posting questions to the Avogadro forum since I don't come here often.

$\endgroup$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .