Skip to content

Bugs in ECI for QM and QM/MM (point charge embedding only). #25

@gmondragn

Description

@gmondragn

I'm trying to use ECI module on an 60 atoms two molecule system. To test ECI module beyond the example, I submitted a QM calculation with only my 60 atoms. Atom types are C, H, N, O, and Cl.

I created BD and BA corresponding directories according to SHARC manual, and my ECI template is not different from the example in SHARC directory. ECI iterates correctly over the point charges and it calculates correctly all my requested states. After that, it displays some warnings, then displays an error and suddenly ECI stops:

/projects/donglab/software/SHARC4/bin/SHARC_ECI.py:944: ComplexWarning: Casting complex values to real discards the imaginary part
mu[z][(s1,s2)] = child.QMout['dm'][:,i1,i2].astype(float)
/projects/donglab/software/SHARC4/lib/ECI.py:419: ComplexWarning: Casting complex values to real discards the imaginary part
energies = [ f.H[s.Z][f.states[s.Z].index(s), f.states[s.Z].index(s)].astype(float) for s in states ]
Traceback (most recent call last):
File "/projects/donglab/software/SHARC4/bin/SHARC_ECI.py", line 1047, in
SHARC_ECI().main()
~~~~~~~~~~~~~~~~^^
File "/projects/donglab/software/SHARC4/lib/SHARC_INTERFACE.py", line 292, in main
self.run()
~~~~~~~~^^
File "/projects/donglab/software/SHARC4/bin/SHARC_ECI.py", line 979, in run
self.ECIjobs[Z].run()
~~~~~~~~~~~~~~~~~~~^^
File "/projects/donglab/software/SHARC4/lib/ECI.py", line 321, in run
self.calculate_Hmat() # Construct entire ECI-CT Hamiltonian for all multiplicities
~~~~~~~~~~~~~~~~~~~^^
File "/projects/donglab/software/SHARC4/lib/ECI.py", line 987, in calculate_Hmat
bas2 = self.extract_subbasis_from_global_indices( self.log, f2.mol.basis, [ f2.mol.atom_symbol(i) for i in range(f2.mol.natm)], shells_2 )
File "/projects/donglab/software/SHARC4/lib/ECI.py", line 748, in extract_subbasis_from_global_indices
shells = mole_basis[atom]
~~~~~~~~~~^^^^^^
KeyError: 'Cl7'

My QM.log file is truncated after the error occurs.

Now, a different error arises when I include an external point charge embedding by adding "point_charges" keyword in QM.in file. The calculation starts, somehow it's not parsing my file with the point charge coordinates and charges. It displays the following error:

Traceback (most recent call last):
File "/projects/donglab/software/SHARC4/SHARC402/bin/SHARC_ECI.py", line 1053, in
SHARC_ECI().main()
~~~~~~~~~~~~~~~~^^
File "/projects/donglab/software/SHARC4/SHARC402/lib/SHARC_INTERFACE.py", line 292, in main
self.set_coords(QMinfilename)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/projects/donglab/software/SHARC4/SHARC402/bin/SHARC_ECI.py", line 714, in set_coords
if QMin.coords['pccoords'] != None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I would appreciate any help on these issues!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions