Natural Population Analysis JSON

Post Reply
christinem2005
Posts: 1
Joined: Fri Sep 06, 2024 4:08 pm
Full Name: Christine Morales
Organization: University of Mount Union
Subdiscipline: Chemistry

Natural Population Analysis JSON

Post by christinem2005 »

Dear WebMO,
I'm interested in using the REST functionality to access Natural Population Analysis from Jupyter notebooks.
I've noticed that the JSON-formatted results include the Natural Population Analysis as a text string instead of as a list. For example:

Code: Select all

    "natural_population_analysis": "1,C,-0.73245:2,C,0.84034:3,O,-0.72736:4,N,-0.92041:5,H,0.41011:6,H,0.42098:7,H,0.21089:8,H,0.24921:9,H,0.24870",
    "partial_charges": {
      "mulliken": [-0.579558, 0.731156, -0.596427, -0.918299, 0.387486, 0.395543, 0.162305, 0.209309, 0.208486]
    },
I'm honestly very new to this, but I'd assume it might be easier to use Natural Population Analysis if it were included as a list. For example:

Code: Select all

     "partial_charges": {
      "mulliken": [-0.579558, 0.731156, -0.596427, -0.918299, 0.387486, 0.395543, 0.162305, 0.209309, 0.208486],
      "natural_population_analysis": [-0.73245,0.84034,-0.72736,-0.92041,0.41011,0.42098,0.21089,0.24921,0.24870]
    },
Am I missing something that would be obvious to more experienced programmers? Is there a recommended way to use Natural Population Analysis via REST requests, employing the currently implemented JSON format? If not, may I please submit this as a potential feature request?

Sincerely,
Christine
schmidt
Posts: 98
Joined: Sat May 30, 2020 3:00 pm
Full Name: JR Schmidt
Organization: WebMO, LLC

Re: Natural Population Analysis JSON

Post by schmidt »

Great suggestion. I've already implemented this and it will be in the next bug fix release of WebMO 24.

If you contact me via email, I can send you an updated file to drop into place for now.
Post Reply