Skip to content

Instantly share code, notes, and snippets.

@linminhtoo
Last active September 5, 2022 03:02
Show Gist options
  • Save linminhtoo/84182da4bf727361b23905f34a429a5d to your computer and use it in GitHub Desktop.
Save linminhtoo/84182da4bf727361b23905f34a429a5d to your computer and use it in GitHub Desktop.
psi4 error when running ESPSim on `ATP` vs `Dinaciclib`
*** tstart() called on nixos
*** at Fri Sep 2 16:47:54 2022
=> Loading Basis Set <=
Name: 3-21G
Role: ORBITAL
Keyword: BASIS
atoms 1, 3-13, 16, 18-21, 23, 26-28 entry C line 68 file /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/share/psi4/basis/3-21g.gbs
atoms 2, 14-15, 17, 22, 25 entry N line 79 file /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/share/psi4/basis/3-21g.gbs
atoms 24, 29 entry O line 90 file /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/share/psi4/basis/3-21g.gbs
atoms 30-58 entry H line 21 file /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/share/psi4/basis/3-21g.gbs
---------------------------------------------------------
SCF
by Justin Turney, Rob Parrish, Andy Simmonett
and Daniel G. A. Smith
RHF Reference
1 Threads, 500 MiB Core
---------------------------------------------------------
==> Geometry <==
Molecular point group: c1
Full point group: C1
Geometry (in Angstrom), charge = 0, multiplicity = 2:
Center X Y Z Mass
------------ ----------------- ----------------- ----------------- -----------------
C -0.152816224406 -0.328542767359 0.201451528419 12.000000000000
N 1.722871775594 0.477323232641 -1.080246471581 14.003074004430
C 0.900761775594 1.590078232641 -1.503681471581 12.000000000000
C 2.601035775594 2.008167232641 -3.282137471581 12.000000000000
C 2.930446775594 4.252219232641 -4.094527471581 12.000000000000
C -2.463431224406 -1.983172767359 2.609355528419 12.000000000000
C -4.747658224406 -1.726137767359 1.857430528419 12.000000000000
C -2.967083224406 -0.262881767359 0.845163528419 12.000000000000
C -3.984721224406 2.027597232641 1.207548528419 12.000000000000
C 2.131255775594 -4.208380767359 3.624834528419 12.000000000000
C 2.083685775594 -4.607064767359 2.177072528419 12.000000000000
C 2.251902775594 -3.411672767359 1.311928528419 12.000000000000
C 3.382410775594 -3.030240767359 0.610783528419 12.000000000000
N 3.113543775594 -1.894605767359 -0.041465471581 14.003074004430
N 1.863406775594 -1.524188767359 0.204645528419 14.003074004430
C 1.307725775594 -2.447241767359 1.040397528419 12.000000000000
N 0.053151775594 -2.325503767359 1.453811528419 14.003074004430
C -0.691582224406 -1.273276767359 1.044522528419 12.000000000000
C 1.148994775594 -0.479279767359 -0.211519471581 12.000000000000
C 1.639236775594 2.474056232641 -2.430049471581 12.000000000000
C 3.251662775594 2.908671232641 -4.121856471581 12.000000000000
N 1.980775775594 4.713833232641 -3.253700471581 14.003074004430
C 1.357814775594 3.842049232641 -2.447628471581 12.000000000000
O 1.668508775594 6.061393232641 -3.236582471581 15.994914619570
N -2.031302224406 -1.152867767359 1.476030528419 14.003074004430
C -3.654084224406 -2.774622767359 2.122942528419 12.000000000000
C -4.271742224406 -0.992952767359 0.621828528419 12.000000000000
C -3.064067224406 0.961218232641 1.685005528419 12.000000000000
O -5.292766224406 1.638081232641 1.103105528419 15.994914619570
H -0.739781224406 0.546588232641 -0.140659471581 1.007825032230
H 2.718711775594 0.384555232641 -1.406670471581 1.007825032230
H 0.534369775594 2.176757232641 -0.625573471581 1.007825032230
H 0.002353775594 1.173899232641 -1.997587471581 1.007825032230
H 2.866106775594 0.967256232641 -3.324082471581 1.007825032230
H 3.427390775594 4.955495232641 -4.738631471581 1.007825032230
H -2.836940224406 -1.284781767359 3.404959528419 1.007825032230
H -1.643850224406 -2.589571767359 2.988873528419 1.007825032230
H -5.704686224406 -2.198124767359 1.624545528419 1.007825032230
H -4.778972224406 -1.060141767359 2.748071528419 1.007825032230
H -2.616699224406 0.027178232641 -0.171742471581 1.007825032230
H -3.957157224406 2.841013232641 1.992159528419 1.007825032230
H -3.589837224406 2.468832232641 0.266237528419 1.007825032230
H 1.209578775594 -4.503627767359 4.163698528419 1.007825032230
H 2.317208775594 -3.114588767359 3.724121528419 1.007825032230
H 2.989118775594 -4.728457767359 4.125700528419 1.007825032230
H 2.865654775594 -5.342641767359 1.911011528419 1.007825032230
H 1.084233775594 -5.038784767359 1.963646528419 1.007825032230
H 4.312839775594 -3.581738767359 0.612073528419 1.007825032230
H 4.020263775594 2.567851232641 -4.809594471581 1.007825032230
H 0.590977775594 4.209362232641 -1.767597471581 1.007825032230
H 0.897325775594 6.346318232641 -3.860301471581 1.007825032230
H -3.360014224406 -3.195757767359 1.124571528419 1.007825032230
H -3.996515224406 -3.535002767359 2.831327528419 1.007825032230
H -5.047375224406 -0.421074767359 0.135369528419 1.007825032230
H -4.010960224406 -1.821726767359 -0.110046471581 1.007825032230
H -3.235966224406 0.714679232641 2.759000528419 1.007825032230
H -2.027524224406 1.415111232641 1.684939528419 1.007825032230
H -5.867521224406 1.970516232641 1.834765528419 1.007825032230
Running in c1 symmetry.
Rotational constants: A = 0.00571 B = 0.00328 C = 0.00217 [cm^-1]
Rotational constants: A = 171.11133 B = 98.40977 C = 65.07288 [MHz]
Nuclear repulsion = 2769.259415204701327
Charge = 0
Multiplicity = 2
Electrons = 213
Nalpha = 107
Nbeta = 106
==> Algorithm <==
SCF Algorithm Type is DF.
DIIS enabled.
MOM disabled.
Fractional occupation disabled.
Guess Type is SAD.
Energy threshold = 1.00e-06
Density threshold = 1.00e-06
Integral threshold = 1.00e-12
==> Primary Basis <==
Basis Set: 3-21G
Blend: 3-21G
Number of shells: 203
Number of basis functions: 319
Number of Cartesian functions: 319
Spherical Harmonics?: false
Max angular momentum: 1
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Input In [5], in <cell line: 2>()
1 t0 = time.time()
----> 2 shape_sims, esp_sims = EmbedAlignScore(
3 probe_mol=deepcopy(mol_atp),
4 ref_mols=deepcopy(mol_dina),
5 probe_num_confs=10,
6 ref_num_confs=10, # use co-crystal conformer only
7 skip_ref_embed=True, # use co-crystal conformer only
8 partial_charge_mode="resp",
9 renormalize=True, # to [0, 1]
10 getBestESP=True, # more accurate but slower
11 randomseed=2342,
12 model_path=Path("/home/machineer/machineer-nix/repos/espsim/data/QM_137k.pt")
13 )
14 print(shape_sims, esp_sims)
15 print(f"time taken: {time.time() - t0:.2f}s")
File ~/machineer-nix/repos/espsim/notebooks/../src/espsim/electrostatics.py:697, in EmbedAlignScore(probe_mol, ref_mols, probe_num_confs, ref_num_confs, probe_charges, ref_charges, metric, integrate, partial_charge_mode, renormalize, customrange, marginMC, nMC, basisPsi4, methodPsi4, gridPsi4, getBestESP, randomseed, skip_ref_embed, model_path)
695 alignment = rdMolAlign.GetCrippenO3A(probe_mol, ref_mol, prbCrippen, refCrippen, j, i)
696 alignment.Align()
--> 697 score = GetEspSim(
698 probe_mol,
699 ref_mol,
700 j,
701 i,
702 probe_charges,
703 ref_charges[idx],
704 metric,
705 integrate,
706 partial_charge_mode,
707 renormalize,
708 customrange,
709 marginMC,
710 nMC,
711 basisPsi4,
712 methodPsi4,
713 gridPsi4,
714 randomseed=randomseed,
715 model_path=model_path,
716 )
717 if score > espSim:
718 espSim = score
File ~/machineer-nix/repos/espsim/notebooks/../src/espsim/electrostatics.py:157, in GetEspSim(probe_mol, ref_mol, prbCid, refCid, probe_charges, ref_charges, metric, integrate, partial_charge_mode, renormalize, customrange, marginMC, nMC, basisPsi4, methodPsi4, gridPsi4, nocheck, randomseed, model_path)
146 # Set up probe molecule properties:
147 prbCoor, probe_charges = GetMolProps(
148 probe_mol,
149 prbCid,
(...)
155 model_path=model_path,
156 )
--> 157 refCoor, ref_charges = GetMolProps(
158 ref_mol,
159 refCid,
160 ref_charges,
161 partial_charge_mode,
162 basisPsi4,
163 methodPsi4,
164 gridPsi4,
165 model_path=model_path,
166 )
168 if integrate == "gauss":
169 similarity = GetIntegralsViaGaussians(prbCoor, refCoor, probe_charges, ref_charges, metric)
File ~/machineer-nix/repos/espsim/notebooks/../src/espsim/electrostatics.py:61, in GetMolProps(mol, cid, charge, partial_charge_mode, basisPsi4, methodPsi4, gridPsi4, model_path)
59 elif partial_charge_mode == "resp":
60 xyz = Chem.rdmolfiles.MolToXYZBlock(mol, confId=cid)
---> 61 charge = psi4Charges(xyz, basisPsi4, methodPsi4, gridPsi4)
62 else:
63 raise ValueError("Unknown partial charge distribution.")
File ~/machineer-nix/repos/espsim/notebooks/../src/espsim/helpers.py:111, in psi4Charges(xyz, basisPsi4, methodPsi4, gridPsi4)
100 mol.update_geometry()
102 options = {
103 "VDW_SCALE_FACTORS": [1.4, 1.6, 1.8, 2.0],
104 "VDW_POINT_DENSITY": int(gridPsi4),
(...)
108 "METHOD_ESP": methodPsi4,
109 }
--> 111 charge = resp.resp([mol], options)[1]
112 return charge
File /nix/store/a016xj7y85yxdyds232i91b4y9s6s2k2-python3.10-resp-1.0.0/lib/python3.10/site-packages/resp/driver.py:147, in resp(molecules, options)
145 psi4.set_options({'basis': options['BASIS_ESP']})
146 psi4.set_options(options.get('PSI4_OPTIONS', {}))
--> 147 psi4.prop(options['METHOD_ESP'], properties=['GRID_ESP'])
148 data['esp_values'].append(np.loadtxt('grid_esp.dat'))
149 psi4.core.clean()
File /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/lib/python3.10/site-packages/psi4/driver/driver.py:776, in properties(*args, **kwargs)
774 logger.info(f"Compute properties(): method={lowername}, basis={core.get_global_option('BASIS').lower()}, molecule={molecule.name()}, nre={'w/EFP' if hasattr(molecule, 'EFP') else molecule.nuclear_repulsion_energy()}")
775 logger.debug("w/EFP" if hasattr(molecule, "EFP") else pp.pformat(molecule.to_dict()))
--> 776 wfn = procedures["properties"][lowername](lowername, molecule=molecule, **kwargs)
777 logger.info(f"Return properties(): {core.variable('CURRENT ENERGY')}")
779 basisstash.restore()
File /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/lib/python3.10/site-packages/psi4/driver/procrouting/proc.py:3020, in run_scf_property(name, **kwargs)
3017 core.set_global_option("SAVE_JK", True)
3019 # Compute the Wavefunction
-> 3020 scf_wfn = run_scf(name, scf_do_properties=False, do_timer=False, **kwargs)
3022 # Run OEProp
3023 oe = core.OEProp(scf_wfn)
File /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/lib/python3.10/site-packages/psi4/driver/procrouting/proc.py:2455, in run_scf(name, **kwargs)
2452 if not core.has_global_option_changed('SCF_TYPE'):
2453 core.set_global_option('SCF_TYPE', 'DF')
-> 2455 scf_wfn = scf_helper(name, post_scf=False, **kwargs)
2456 returnvalue = scf_wfn.energy()
2458 ssuper = scf_wfn.functional()
File /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/lib/python3.10/site-packages/psi4/driver/procrouting/proc.py:1576, in scf_helper(name, post_scf, **kwargs)
1573 core.print_out("\n ---------------------------------------------------------\n")
1574 core.print_out(" " + banner.center(58))
-> 1576 scf_wfn = scf_wavefunction_factory(name, base_wfn, core.get_option('SCF', 'REFERENCE'), **kwargs)
1577 core.set_legacy_wavefunction(scf_wfn)
1579 # The wfn from_file routine adds the npy suffix if needed, but we add it here so that
1580 # we can use os.path.isfile to query whether the file exists before attempting to read
File /nix/store/ymlr9hgxz3yqmlrbndygz5s2xrbmlvrq-python3.10-psi4-1.6.1/lib/python3.10/site-packages/psi4/driver/procrouting/proc.py:1214, in scf_wavefunction_factory(name, ref_wfn, reference, **kwargs)
1212 core.prepare_options_for_module("SCF")
1213 if reference in ["RHF", "RKS"]:
-> 1214 wfn = core.RHF(ref_wfn, superfunc)
1215 elif reference == "ROHF":
1216 wfn = core.ROHF(ref_wfn, superfunc)
RuntimeError:
Fatal Error: RHF: RHF reference is only for singlets.
Error occurred in file: /build/source/psi4/src/psi4/libscf_solver/rhf.cc on line: 92
The most recent 5 function calls were:
psi::PsiException::PsiException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*, int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment