GilsonLabUCSD / pAPRika

Advanced toolkit for binding free energy calculations
BSD 3-Clause "New" or "Revised" License
31 stars 14 forks source link

error in paprika tutorial cb6-but #185

Closed mauramalinka01 closed 1 year ago

mauramalinka01 commented 1 year ago

Dear all, I have a problem with a running the tutorial for cb6-but.

Error message: /home/maura/miniconda3/lib/python3.9/site-packages/parmed/structure.py:1684: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray. return np.array(coords) Traceback (most recent call last): File "/home/maura/miniconda3/lib/python3.9/site-packages/pint/facets/plain/quantity.py", line 707, in float raise DimensionalityError(self._units, "dimensionless") pint.errors.DimensionalityError: Cannot convert from 'angstrom' to 'dimensionless'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/maura/paprika/cb6-but.py", line 45, in structure.save("cb6-but/aligned_with_dummy.rst7", overwrite=True) File "/home/maura/miniconda3/lib/python3.9/site-packages/parmed/structure.py", line 1516, in save rst7.coordinates = self.coordinates File "/home/maura/miniconda3/lib/python3.9/site-packages/parmed/structure.py", line 1684, in coordinates return np.array(coords) ValueError: setting an array element with a sequence.

Please help. What am I doing wrong. Thanks, Maura

jeff231li commented 1 year ago

Hi Maura, this could be an issue with different versions of the library. Can you tell how you installed pAPRika and possibly send me your conda environment conda env export > paprika.yaml.

mauramalinka01 commented 1 year ago

Dear Jeff, I have installed it by conda. I have solved the first problem, but I don't know how. I changed to python3.8 and added the units. I am not very good with conda. It's is almost working. Everything is fine up to the analysis part. Another unit problem.:) I am attaching the result of conda env export below.

/home/maura/miniconda3/envs/py38/lib/python3.8/site-packages/paprika/analysis.py:649: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray. data_points = [len(np.asarray(x).T) for x in self.simulation_data[phase]] /home/maura/miniconda3/envs/py38/lib/python3.8/site-packages/paprika/analysis.py:973: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray. force_constants_T = np.asarray(force_constants).T force_units /home/maura/miniconda3/envs/py38/lib/python3.8/site-packages/paprika/analysis.py:974: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray. targets_T = np.asarray(targets).T target_units /home/maura/miniconda3/envs/py38/lib/python3.8/site-packages/paprika/analysis.py:1323: UserWarning: Converting restraint list to dictionary, make sure the restraints are listed in the order of [r, theta,phi, alpha, beta, gamma]. warnings.warn( The binding affinity for butane and cucurbit[6]uril = -5.65 +/- 4.51 kcal/mol

paprika.txt

Thank You.

jeff231li commented 1 year ago

@mauramalinka01 I think everything looks fine as long as the guest restraints list is in the order [r, theta, phi, alpha, beta, gamma]. The unit warning is from pint and its triggered when we strip units from a numpy array. I guess stick to python3.8 since it works.

jeff231li commented 1 year ago

Closing, I assume you have the simulations working now. Feel free to reopen if you're still running into problems.