sharc-md / sharc

The SHARC molecular dynamics (MD) program suite is an ab initio MD software package developed to study the excited-state dynamics of molecules.
https://www.sharc-md.org
GNU General Public License v3.0
59 stars 31 forks source link

Tutorial NameError #57

Open diamondpinkstart opened 1 year ago

diamondpinkstart commented 1 year ago

Hello,

I try to reproduce the new Sharc 3 Tutorial and I am stuck at "2.9.7 Essential Dynamics Analysis".

After prompting all inputs for the script, I get the error:

"Reading trajectory /home/xxx/Sharc_tutorial/Tutorial/traj/Singlet_2//TRAJ_00002/output.xyz ... Traceback (most recent call last): File "/cluster/apps/sharc/3.0.1/bin/trajana_essdyn.py", line 582, in main() File "/cluster/apps/sharc/3.0.1/bin/trajana_essdyn.py", line 575, in main ess_dyn(INFOS) File "/cluster/apps/sharc/3.0.1/bin/trajana_essdyn.py", line 470, in ess_dyn coor_matrix = trajectory.ret_coor_matrix() File "/cluster/apps/sharc/3.0.1/bin/../lib/traj_manip.py", line 107, in ret_coor_matrix coor_list = [structure.ret_vector() for structure in self.structures] File "/cluster/apps/sharc/3.0.1/bin/../lib/traj_manip.py", line 107, in coor_list = [structure.ret_vector() for structure in self.structures] File "/cluster/apps/sharc/3.0.1/bin/../lib/struc_linalg.py", line 76, in ret_vector for i in xrange(self.mol.NumAtoms()): NameError: name 'xrange' is not defined"

Everything else worked so far.

Thank you very much.

maisebastian commented 1 year ago

Dear User, this bug should be fixed in SHARC 3.0.1 (https://github.com/sharc-md/sharc/releases/tag/v3.0.1).

Best, Sebastian

diamondpinkstart commented 1 year ago

Dear Sebastian, I am using SHARC 3.0.1 and the error occurs there.

Thank you

maisebastian commented 1 year ago

I see, sorry for the wrong information then. It seems that the commit that fixes this bug did not make it into 3.0.1. You can still get the fix here: https://github.com/sharc-md/sharc/tree/main/lib The newest commit should read "trajana libraries: removed xrange, changed openbabel import". If you download the 6 Python files in the folder and update your installation with them, it should work.

Best, Sebastian