solvation-analysis icon indicating copy to clipboard operation
solvation-analysis copied to clipboard

rdf_data not initialized properly when running solute.run()

Open Caboomi opened this issue 10 months ago • 6 comments

I am using ase to convert an xdatcar file to a xyz and pdb file and reading it into the mda.Universe as you can see in the pdf attached vertopal.com_5x_analysis.pdf. I am receiving an error when running solute.plot_solvation_radius('Li', solvent) as KeyError: 'Li' despite having this:

solute = Solute.from_atoms( dme_Li, {'dme_TFSI': dme_TFSI, 'dme_DOL': dme_DOL, 'dme_DME': dme_DME}, solute_name="Li", radii={"dme_TFSI": 2.6, "dme_DOL": 2.6, "dme_DME": 2.6} ) as my solute.

I think it could stem from run() not initializing rdf_data properly as it creates solute_0 ... solute_4 in my rdf_data rather than having 'Li'in the directory. My Li solute is made up of 5 Li atoms.

Caboomi avatar Apr 05 '24 16:04 Caboomi

I think it could stem from run() not initializing rdf_data properly as it creates solute_0 ... solute_4 in my rdf_data rather than having 'Li'in the directory. My Li solute is made up of 5 Li atoms.

Thanks for the report. I think you are probably right about this. Could you post the input files so I can take a look?

In the meantime, you could try using rename_solutes = {"solute_0": "Li", ..., "solute_4": "Li"} as a kwarg?

orionarcher avatar Apr 05 '24 18:04 orionarcher

https://drive.google.com/drive/folders/1cdZyy6Cca2IfW2qwt9HVLevLtmYS_KH9?usp=sharing

You can find the files here. Thank you for the suggestion, it worked!

Caboomi avatar Apr 10 '24 04:04 Caboomi

@orionarcher Were you able to fix it?

Caboomi avatar Apr 18 '24 05:04 Caboomi

Not yet but I've observed the bug in another case and it's on my TODO list.

orionarcher avatar Apr 19 '24 15:04 orionarcher

Hi Caboomi. I am taking a look at this but would appreciate some help.

Would you mind sending along a minimal reproduction of the bug? In particular, could 1) you remove the calls to ase and any other code not involved in direct generation of the bug 2) specify exactly which files I should be loading.

I don't have ase set up and I'd prefer to not have to configure a whole new environment to get to the bottom of this. Thank you!

orionarcher avatar May 07 '24 21:05 orionarcher

Hey I am really sorry! I just saw this! I tried reproducing the bug but it's fixed now! Thank you so much!

Caboomi avatar Sep 18 '24 15:09 Caboomi