From 8be06f819750812220b474d88c88b8d6fb32cec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Mon, 15 Jul 2024 20:28:39 +0200 Subject: [PATCH] typos and typos --- examples/mcscf/14-project_init_guess.py | 2 +- examples/pbc/20-k_points_scf_ksymm.py | 4 ++-- examples/tddft/31-energy_transfer_coupling_matrix.py | 2 +- pyscf/dft/dks.py | 2 +- pyscf/dft/numint.py | 2 +- pyscf/dft/rks.py | 2 +- pyscf/fci/direct_nosym.py | 4 ++-- pyscf/fci/direct_spin1.py | 10 +++++----- pyscf/gto/mole.py | 6 +++--- pyscf/gw/gw_ac.py | 2 +- pyscf/gw/ugw_ac.py | 2 +- pyscf/lib/cc/ccsd_pack.c | 2 +- pyscf/lib/gto/autocode/parser.cl | 2 +- pyscf/lib/linalg_helper.py | 4 ++-- pyscf/lib/mcscf/fci_contract.c | 2 +- pyscf/lib/misc.py | 6 +++--- pyscf/lib/solvent/mnsol.F | 8 ++++---- pyscf/mcscf/__init__.py | 2 +- pyscf/mcscf/apc.py | 2 +- pyscf/md/integrators.py | 4 ++-- pyscf/mp/mp2.py | 2 +- pyscf/mp/ump2.py | 2 +- pyscf/pbc/ci/kcis_rhf.py | 4 ++-- pyscf/pbc/df/aft.py | 2 +- pyscf/pbc/df/df.py | 4 ++-- pyscf/pbc/df/fft.py | 2 +- pyscf/pbc/df/gdf_builder.py | 2 +- pyscf/pbc/df/mdf.py | 2 +- pyscf/pbc/df/rsdf.py | 2 +- pyscf/pbc/df/rsdf_builder.py | 4 ++-- pyscf/pbc/dft/cdft.py | 4 ++-- pyscf/pbc/dft/multigrid/multigrid.py | 2 +- pyscf/pbc/dft/multigrid/multigrid_pair.py | 2 +- pyscf/pbc/dft/multigrid/pp.py | 2 +- pyscf/pbc/gto/cell.py | 4 ++-- pyscf/pbc/gto/pseudo/pp.py | 2 +- pyscf/pbc/gto/pseudo/test/test_pp.py | 2 +- pyscf/pbc/gw/krgw_ac.py | 2 +- pyscf/pbc/gw/kugw_ac.py | 2 +- pyscf/pbc/lib/linalg_helper.py | 2 +- pyscf/pbc/scf/cphf.py | 2 +- pyscf/pbc/scf/rsjk.py | 2 +- pyscf/pbc/tdscf/kproxy.py | 2 +- pyscf/pbc/tdscf/kproxy_supercell.py | 2 +- pyscf/pbc/tdscf/proxy.py | 2 +- pyscf/pbc/tools/pbc.py | 2 +- pyscf/scf/cphf.py | 2 +- pyscf/scf/dhf.py | 2 +- pyscf/scf/hf.py | 2 +- pyscf/scf/ucphf.py | 2 +- pyscf/symm/addons.py | 4 ++-- pyscf/tdscf/proxy.py | 2 +- 52 files changed, 73 insertions(+), 73 deletions(-) diff --git a/examples/mcscf/14-project_init_guess.py b/examples/mcscf/14-project_init_guess.py index c8e063617b..0456a976ab 100644 --- a/examples/mcscf/14-project_init_guess.py +++ b/examples/mcscf/14-project_init_guess.py @@ -10,7 +10,7 @@ Use project_init_guess function to format the CASSCF initial guess orbitals CASSCF solver can use any orbital as initial guess, no matter how and where -you get the orbital coeffcients. It can even be the orbitals of different +you get the orbital coefficients. It can even be the orbitals of different molecule. ''' diff --git a/examples/pbc/20-k_points_scf_ksymm.py b/examples/pbc/20-k_points_scf_ksymm.py index 2e61eee4e7..9cae440353 100644 --- a/examples/pbc/20-k_points_scf_ksymm.py +++ b/examples/pbc/20-k_points_scf_ksymm.py @@ -43,7 +43,7 @@ # # The mean-field object with k-point symmetry can be converted back to -# the correponding non-symmetric mean-field object +# the corresponding non-symmetric mean-field object # kmf = kmf.to_khf() @@ -64,7 +64,7 @@ # # The mean-field object with k-point symmetry can be converted back to -# the correponding non-symmetric mean-field object +# the corresponding non-symmetric mean-field object # kumf = kumf.to_khf() kumf.kernel(kumf.make_rdm1()) diff --git a/examples/tddft/31-energy_transfer_coupling_matrix.py b/examples/tddft/31-energy_transfer_coupling_matrix.py index 7dc110195b..364c63e4b0 100644 --- a/examples/tddft/31-energy_transfer_coupling_matrix.py +++ b/examples/tddft/31-energy_transfer_coupling_matrix.py @@ -31,7 +31,7 @@ v_B = moB[:,mfB.mo_occ==0] tdB = mfB.TDA().run() -# CIS coeffcients +# CIS coefficients state_id = 2 # The third excited state t1_A = tdA.xy[state_id][0] t1_B = tdB.xy[state_id][0] diff --git a/pyscf/dft/dks.py b/pyscf/dft/dks.py index bfe1de0f6c..8df524618b 100644 --- a/pyscf/dft/dks.py +++ b/pyscf/dft/dks.py @@ -46,7 +46,7 @@ def energy_elec(ks, dm=None, h1e=None, vhf=None): ks : an instance of DFT class dm : 2D ndarray - one-partical density matrix + one-particle density matrix h1e : 2D ndarray Core hamiltonian diff --git a/pyscf/dft/numint.py b/pyscf/dft/numint.py index 562aa9626f..7eef303d2c 100644 --- a/pyscf/dft/numint.py +++ b/pyscf/dft/numint.py @@ -2633,7 +2633,7 @@ def get_rho(ni, mol, dm, grids, max_memory=2000): class LibXCMixin: libxc = libxc - omega = None # RSH paramter + omega = None # RSH parameter #################### # Overwrite following functions to use custom XC functional diff --git a/pyscf/dft/rks.py b/pyscf/dft/rks.py index bc6a86caf3..8c60907aec 100644 --- a/pyscf/dft/rks.py +++ b/pyscf/dft/rks.py @@ -228,7 +228,7 @@ def energy_elec(ks, dm=None, h1e=None, vhf=None): ks : an instance of DFT class dm : 2D ndarray - one-partical density matrix + one-particle density matrix h1e : 2D ndarray Core hamiltonian diff --git a/pyscf/fci/direct_nosym.py b/pyscf/fci/direct_nosym.py index 913cedd6b0..360504ea9f 100644 --- a/pyscf/fci/direct_nosym.py +++ b/pyscf/fci/direct_nosym.py @@ -204,11 +204,11 @@ def eig(self, op, x0=None, precond=None, **kwargs): return scipy.linalg.eigh(op) # TODO: check the hermitian of Hamiltonian then determine whether to - # call the non-hermitian diagonlization solver davidson_nosym1 + # call the non-hermitian diagonalization solver davidson_nosym1 warnings.warn('direct_nosym.kernel is not able to diagonalize ' 'non-Hermitian Hamiltonian. If h1e and h2e is not ' - 'hermtian, calling symmetric diagonlization in eig ' + 'hermtian, calling symmetric diagonalization in eig ' 'can lead to wrong results.') self.converged, e, ci = \ diff --git a/pyscf/fci/direct_spin1.py b/pyscf/fci/direct_spin1.py index 710acc872c..784a557561 100644 --- a/pyscf/fci/direct_spin1.py +++ b/pyscf/fci/direct_spin1.py @@ -511,8 +511,8 @@ def kernel_ms1(fci, h1e, eri, norb, nelec, ci0=None, link_index=None, nroots: int Number of states to solve davidson_only: bool - Whether to call subspace diagonlization (davidson solver) or do a - full diagonlization (lapack eigh) for small systems + Whether to call subspace diagonalization (davidson solver) or do a + full diagonalization (lapack eigh) for small systems pspace_size: int Number of determinants as the threshold of "small systems", hop: function(c) => array_like_c @@ -669,7 +669,7 @@ class FCIBase(lib.StreamObject): problems being solved by Davidson subspace algorithm. This flag should be enabled when initial guess is given or particular spin symmetry or point-group symmetry is required because the initial - guess or symmetry are completely ignored in the direct diagonlization. + guess or symmetry are completely ignored in the direct diagonalization. pspace_size : int The dimension of Hamiltonian matrix over which Davidson iteration algorithm will be used for the eigenvalue problem. Default is 400. @@ -716,8 +716,8 @@ class FCIBase(lib.StreamObject): # dependence basis in davidson diagonalization solver level_shift = getattr(__config__, 'fci_direct_spin1_FCI_level_shift', 1e-3) - # force the diagonlization use davidson iteration. When the CI space - # is small, the solver exactly diagonlizes the Hamiltonian. But this + # force the diagonalization use davidson iteration. When the CI space + # is small, the solver exactly diagonalizes the Hamiltonian. But this # solution will ignore the initial guess. Setting davidson_only can # enforce the solution on the initial guess state davidson_only = getattr(__config__, 'fci_direct_spin1_FCI_davidson_only', False) diff --git a/pyscf/gto/mole.py b/pyscf/gto/mole.py index c89907ee53..ed2644824b 100644 --- a/pyscf/gto/mole.py +++ b/pyscf/gto/mole.py @@ -2197,7 +2197,7 @@ class MoleBase(lib.StreamObject): subgroup atom : list or str - To define molecluar structure. The internal format is + To define molecular structure. The internal format is | atom = [[atom1, (x, y, z)], | [atom2, (x, y, z)], @@ -2473,7 +2473,7 @@ def build(self, dump_input=True, parse_arg=ARGPARSE, max_memory : int, float Allowd memory in MB. If given, overwrite :attr:`Mole.max_memory` atom : list or str - To define molecluar structure. + To define molecular structure. basis : dict or str To define basis set. nucmod : dict or str @@ -3748,7 +3748,7 @@ def __getattr__(self, key): def ao2mo(self, mo_coeffs, erifile=None, dataname='eri_mo', intor='int2e', **kwargs): '''Integral transformation for arbitrary orbitals and arbitrary - integrals. See more detalied documentation in func:`ao2mo.kernel`. + integrals. See more detailed documentation in func:`ao2mo.kernel`. Args: mo_coeffs (an np array or a list of arrays) : A matrix of orbital diff --git a/pyscf/gw/gw_ac.py b/pyscf/gw/gw_ac.py index 919d43259b..6a9f759f01 100644 --- a/pyscf/gw/gw_ac.py +++ b/pyscf/gw/gw_ac.py @@ -20,7 +20,7 @@ Spin-restricted G0W0 approximation with analytic continuation This implementation has N^4 scaling, and is faster than GW-CD (N^4) and analytic GW (N^6) methods. -GW-AC is recommended for valence states only, and is inaccuarate for core states. +GW-AC is recommended for valence states only, and is inaccurate for core states. Method: See T. Zhu and G.K.-L. Chan, arxiv:2007.03148 (2020) for details diff --git a/pyscf/gw/ugw_ac.py b/pyscf/gw/ugw_ac.py index b3d3df2415..2643ce8efc 100644 --- a/pyscf/gw/ugw_ac.py +++ b/pyscf/gw/ugw_ac.py @@ -21,7 +21,7 @@ This implementation has N^4 scaling, and is faster than GW-CD (N^4) and analytic GW (N^6) methods. -GW-AC is recommended for valence states only, and is inaccuarate for core states. +GW-AC is recommended for valence states only, and is inaccurate for core states. Method: See T. Zhu and G.K.-L. Chan, arxiv:2007.03148 (2020) for details diff --git a/pyscf/lib/cc/ccsd_pack.c b/pyscf/lib/cc/ccsd_pack.c index 8551c32b58..3eeedb2827 100644 --- a/pyscf/lib/cc/ccsd_pack.c +++ b/pyscf/lib/cc/ccsd_pack.c @@ -106,7 +106,7 @@ void CCmake_021(double *out, double *v1, double *v2, int count, int m, /* * if matrix B is symmetric for the contraction A_ij B_ij, * Tr(AB) ~ A_ii B_ii + (A_ij + A_ji) B_ij where i > j - * This function extract the A_ii and the lower triangluar part of A_ij + A_ji + * This function extract the A_ii and the lower triangular part of A_ij + A_ji */ void CCprecontract(double *out, double *in, int count, int m, double diagfac) { diff --git a/pyscf/lib/gto/autocode/parser.cl b/pyscf/lib/gto/autocode/parser.cl index a4819ebe89..8c30943426 100644 --- a/pyscf/lib/gto/autocode/parser.cl +++ b/pyscf/lib/gto/autocode/parser.cl @@ -25,7 +25,7 @@ ;;; (bra-ops ... p* |op| ket-ops) ;;; the p* in the bra (| will be evaluated with |op| or |ket-ops) (if they ;;; have cross or dot operators). Using the sticker symbol for p/nabla -;;; to prevent p/nabla operators comutating with the next p/nabla operators +;;; to prevent p/nabla operators commutating with the next p/nabla operators ;;; rscalar? (defparameter *intvar* '(p ip nabla px py pz diff --git a/pyscf/lib/linalg_helper.py b/pyscf/lib/linalg_helper.py index 35df8df3fd..6d5a91da8d 100644 --- a/pyscf/lib/linalg_helper.py +++ b/pyscf/lib/linalg_helper.py @@ -453,7 +453,7 @@ def davidson1(aop, x0, precond, tol=1e-12, max_cycle=50, max_space=12, except IndexError: raise LinearDependenceError('No linearly independent basis found ' 'by the diagonalization solver.') - if heff is None: # Lazy initilize heff to determine the dtype + if heff is None: # Lazy initialize heff to determine the dtype heff = numpy.empty((max_space+nroots,max_space+nroots), dtype=dtype) else: heff = numpy.asarray(heff, dtype=dtype) @@ -826,7 +826,7 @@ def davidson_nosym1(aop, x0, precond, tol=1e-12, max_cycle=50, max_space=20, dtype = numpy.result_type(axt[0], xt[0]) except IndexError: dtype = numpy.result_type(ax[0].dtype, xs[0].dtype) - if heff is None: # Lazy initilize heff to determine the dtype + if heff is None: # Lazy initialize heff to determine the dtype heff = numpy.empty((max_space+nroots,max_space+nroots), dtype=dtype) else: heff = numpy.asarray(heff, dtype=dtype) diff --git a/pyscf/lib/mcscf/fci_contract.c b/pyscf/lib/mcscf/fci_contract.c index 7b94f04a9a..5d39e04cbe 100644 --- a/pyscf/lib/mcscf/fci_contract.c +++ b/pyscf/lib/mcscf/fci_contract.c @@ -59,7 +59,7 @@ */ /* - * For given stra_id, spread alpah-strings (which can propagate to stra_id) + * For given stra_id, spread alpha-strings (which can propagate to stra_id) * into t1[:nstrb,nnorb] * str1-of-alpha -> create/annihilate -> str0-of-alpha * ci0[:nstra,:nstrb] is contiguous in beta-strings diff --git a/pyscf/lib/misc.py b/pyscf/lib/misc.py index ba0ca61c03..15eb6bb132 100644 --- a/pyscf/lib/misc.py +++ b/pyscf/lib/misc.py @@ -727,7 +727,7 @@ def fn1(self, *args, **kwargs): Using alias function instead of fn1 = fn because some methods may be overloaded in the child class. Using "alias" can make sure that the - overloaded mehods were called when calling the aliased method. + overloaded methods were called when calling the aliased method. ''' name = fn.__name__ if alias_name is None: @@ -1015,7 +1015,7 @@ class call_in_background: Attributes: sync (bool): Whether to run in synchronized mode. The default value - is False (asynchoronized mode). + is False (asynchronized mode). Examples: @@ -1064,7 +1064,7 @@ def __enter__(self): # import lock) bug in the threading module. See also # https://github.com/paramiko/paramiko/issues/104 # https://docs.python.org/2/library/threading.html#importing-in-threaded-code - # Disable the asynchoronous mode for safe importing + # Disable the asynchronous mode for safe importing def def_async_fn(i): return fns[i] diff --git a/pyscf/lib/solvent/mnsol.F b/pyscf/lib/solvent/mnsol.F index a53622633a..fd3a64a34b 100644 --- a/pyscf/lib/solvent/mnsol.F +++ b/pyscf/lib/solvent/mnsol.F @@ -44,8 +44,8 @@ SUBROUTINE CDSSET(ICDS,GCDS,AREACDS,NAT,C,IAN,DCDS,X, C ICDS=1 FOR WATER C ICDS=2 FOR ANY NONAQUEOUS SOLVENT C IF ICDS=2 YOU NEED TO PROVIDE THE FOLLOWING SOLVENT DESCRIPTORS (see http://comp.chem.umn.edu/solvation/mnsddb.pdf): -C SOLA (Abraham's hydrogen-bond acidity paramerer), -C SOLB (Abraham's hydrogen-bond basicity paramerer), +C SOLA (Abraham's hydrogen-bond acidity parameter), +C SOLB (Abraham's hydrogen-bond basicity parameter), C SOLC (carbon aromaticity), C SOLG (macroscopic surface tension in cal/(mol A^2), C SOLH (electronegative halogenicity), @@ -306,8 +306,8 @@ SUBROUTINE SMD_CDS_NAQ(SIGMA,HSIGMA,CSSIGM, IMPLICIT DOUBLE PRECISION (A-H,O-Z) C C YOU NEED TO PROVIDE THE FOLLOWING SOLVENT DESCRIPTORS (see http://comp.chem.umn.edu/solvation/mnsddb.pdf): -C SOLA (Abraham's hydrogen-bond acidity paramerer), -C SOLB (Abraham's hydrogen-bond basicity paramerer), +C SOLA (Abraham's hydrogen-bond acidity parameter), +C SOLB (Abraham's hydrogen-bond basicity parameter), C SOLC (carbon aromaticity), C SOLG (macroscopic surface tension in cal/(mol A^2), C SOLH (electronegative halogenicity), diff --git a/pyscf/mcscf/__init__.py b/pyscf/mcscf/__init__.py index f6ab2413cf..77664ea820 100644 --- a/pyscf/mcscf/__init__.py +++ b/pyscf/mcscf/__init__.py @@ -86,7 +86,7 @@ The step size for orbital rotation. Small step size is prefered. Default is 0.02. (NOTE although the default step size is small enough for many systems, - it happens that the orbital optimizor crosses the barriar of local + it happens that the orbital optimizor crosses the barrier of local minimum and converge to the neighbour solution, e.g. the CAS(4,4) for C2H4 in the test files. In these systems, adjusting max_stepsize, max_ci_stepsize and max_cycle_micro and ah_start_tol may be helpful) diff --git a/pyscf/mcscf/apc.py b/pyscf/mcscf/apc.py index ca9f0f7558..61af79c1ad 100644 --- a/pyscf/mcscf/apc.py +++ b/pyscf/mcscf/apc.py @@ -28,7 +28,7 @@ class Chooser(): occ: 1D Numpy Array Orbital occupations for orbs (2,1,0); nactel will be set to the number of electrons in the selected orbitals entropies: 1D Numpy Array - Importance measurment used to rank the orbitals + Importance measurement used to rank the orbitals max_size: Int or Tuple Active space size constraint. If tuple, interpreted as (nelecas,ncas) diff --git a/pyscf/md/integrators.py b/pyscf/md/integrators.py index 5b1cb29b4d..4d791346ae 100644 --- a/pyscf/md/integrators.py +++ b/pyscf/md/integrators.py @@ -179,8 +179,8 @@ class _Integrator(lib.StreamObject): Time of the last step during the simulation. callback : function(envs_dict) => None - Callback function takes one dict as the arugment which is - generaged by the builtin function :func:`locals`, so that the + Callback function takes one dict as the argument which is + generated by the builtin function :func:`locals`, so that the callback function can access all local variables in the current environment. ''' diff --git a/pyscf/mp/mp2.py b/pyscf/mp/mp2.py index e7ebf61587..a6a70f3702 100644 --- a/pyscf/mp/mp2.py +++ b/pyscf/mp/mp2.py @@ -383,7 +383,7 @@ def get_frozen_mask(mp): '''Get boolean mask for the restricted reference orbitals. In the returned boolean (mask) array of frozen orbital indices, the - element is False if it corresonds to the frozen orbital. + element is False if it corresponds to the frozen orbital. ''' moidx = numpy.ones(mp.mo_occ.size, dtype=bool) if mp._nmo is not None: diff --git a/pyscf/mp/ump2.py b/pyscf/mp/ump2.py index 70c5468bc8..e321e6dca6 100644 --- a/pyscf/mp/ump2.py +++ b/pyscf/mp/ump2.py @@ -217,7 +217,7 @@ def get_frozen_mask(mp): '''Get boolean mask for the unrestricted reference orbitals. In the returned boolean (mask) array of frozen orbital indices, the - element is False if it corresonds to the frozen orbital. + element is False if it corresponds to the frozen orbital. ''' moidxa = numpy.ones(mp.mo_occ[0].size, dtype=bool) moidxb = numpy.ones(mp.mo_occ[1].size, dtype=bool) diff --git a/pyscf/pbc/ci/kcis_rhf.py b/pyscf/pbc/ci/kcis_rhf.py index e45660181f..e402b3f96d 100644 --- a/pyscf/pbc/ci/kcis_rhf.py +++ b/pyscf/pbc/ci/kcis_rhf.py @@ -126,7 +126,7 @@ def precond(r, e0, x0): return evals, evecs def cis_matvec_singlet(cis, vector, kshift, eris=None): - """Compute matrix-vector product of the Hamiltonion matrix and a CIS c + """Compute matrix-vector product of the Hamiltonian matrix and a CIS c oefficient vector, in the space of single excitation. Arguments: @@ -143,7 +143,7 @@ def cis_matvec_singlet(cis, vector, kshift, eris=None): electron repulsion integrals (default: {None}) Returns: - 1D array -- matrix-vector product of the Hamiltonion matrix and the + 1D array -- matrix-vector product of the Hamiltonian matrix and the input vector. """ if eris is None: diff --git a/pyscf/pbc/df/aft.py b/pyscf/pbc/df/aft.py index 0871f36a63..a68b62f7cb 100644 --- a/pyscf/pbc/df/aft.py +++ b/pyscf/pbc/df/aft.py @@ -180,7 +180,7 @@ def _int_nuc_vloc(mydf, nuccell, kpts, intor='int3c2e', aosym='s2', comp=1): raise DeprecationWarning def get_pp(mydf, kpts=None): - '''Get the periodic pseudotential nuc-el AO matrix, with G=0 removed. + '''Get the periodic pseudopotential nuc-el AO matrix, with G=0 removed. Kwargs: mesh: custom mesh grids. By default mesh is determined by the diff --git a/pyscf/pbc/df/df.py b/pyscf/pbc/df/df.py index 6e33488113..3ac16573c4 100644 --- a/pyscf/pbc/df/df.py +++ b/pyscf/pbc/df/df.py @@ -66,7 +66,7 @@ def make_modrho_basis(cell, auxbasis=None, drop_eta=None): r'''Generate a cell object using the density fitting auxbasis as - the basis set. The normalization coeffcients of the auxiliary cell are + the basis set. The normalization coefficients of the auxiliary cell are different to the regular (square-norm) convention. To simplify the compensated charge algorithm, they are normalized against \int (r^l e^{-ar^2} r^2 dr @@ -378,7 +378,7 @@ def load(aux_slice): LpqR = LpqI = None def get_pp(self, kpts=None): - '''Get the periodic pseudotential nuc-el AO matrix, with G=0 removed. + '''Get the periodic pseudopotential nuc-el AO matrix, with G=0 removed. ''' cell = self.cell kpts, is_single_kpt = _check_kpts(self, kpts) diff --git a/pyscf/pbc/df/fft.py b/pyscf/pbc/df/fft.py index a96f58e1b5..66d3c0029b 100644 --- a/pyscf/pbc/df/fft.py +++ b/pyscf/pbc/df/fft.py @@ -63,7 +63,7 @@ def get_nuc(mydf, kpts=None): return numpy.asarray(vne) def get_pp(mydf, kpts=None): - '''Get the periodic pseudotential nuc-el AO matrix, with G=0 removed. + '''Get the periodic pseudopotential nuc-el AO matrix, with G=0 removed. ''' from pyscf.pbc.dft import gen_grid kpts, is_single_kpt = _check_kpts(mydf, kpts) diff --git a/pyscf/pbc/df/gdf_builder.py b/pyscf/pbc/df/gdf_builder.py index 3fd517d193..0ea02a43ea 100644 --- a/pyscf/pbc/df/gdf_builder.py +++ b/pyscf/pbc/df/gdf_builder.py @@ -750,7 +750,7 @@ def auxbar(fused_cell): if es.size == 1: vbar[aux_loc[i]] = -1/es[0] else: - # Remove the normalization to get the primitive contraction coeffcients + # Remove the normalization to get the primitive contraction coefficients norms = half_sph_norm/gto.gaussian_int(2, es) cs = np.einsum('i,ij->ij', 1/norms, fused_cell._libcint_ctr_coeff(i)) vbar[aux_loc[i]:aux_loc[i+1]] = np.einsum('in,i->n', cs, -1/es) diff --git a/pyscf/pbc/df/mdf.py b/pyscf/pbc/df/mdf.py index 2160cebc54..c24fb2f184 100644 --- a/pyscf/pbc/df/mdf.py +++ b/pyscf/pbc/df/mdf.py @@ -98,7 +98,7 @@ def build(self, j_only=None, with_j3c=True, kpts_band=None): df.GDF.build(self, j_only, with_j3c, kpts_band) cell = self.cell if any(x % 2 == 0 for x in self.mesh[:cell.dimension]): - # Even number in mesh can produce planewaves without couterparts + # Even number in mesh can produce planewaves without counterparts # (see np.fft.fftfreq). MDF mesh is typically not enough to capture # all basis. The singular planewaves can break the symmetry in # potential (leads to non-real density) and thereby break the diff --git a/pyscf/pbc/df/rsdf.py b/pyscf/pbc/df/rsdf.py index 429fe48147..116f4946c7 100644 --- a/pyscf/pbc/df/rsdf.py +++ b/pyscf/pbc/df/rsdf.py @@ -32,7 +32,7 @@ In RSGDF, the two-center and three-center Coulomb integrals are calculated in two pars: j2c = j2c_SR(omega) + j2c_LR(omega) j3c = j3c_SR(omega) + j3c_LR(omega) -where the SR and LR integrals correpond to using the following potentials +where the SR and LR integrals correspond to using the following potentials g_SR(r_12;omega) = erfc(omega * r_12) / r_12 g_LR(r_12;omega) = erf(omega * r_12) / r_12 The SR integrals are evaluated in real space using a lattice summation, while diff --git a/pyscf/pbc/df/rsdf_builder.py b/pyscf/pbc/df/rsdf_builder.py index a8afbffeae..aec7db713a 100644 --- a/pyscf/pbc/df/rsdf_builder.py +++ b/pyscf/pbc/df/rsdf_builder.py @@ -1014,7 +1014,7 @@ def get_nuc(nuc_builder): return nuc def get_pp(nuc_builder): - '''get the periodic pseudotential nuc-el ao matrix, with g=0 removed. + '''get the periodic pseudopotential nuc-el ao matrix, with g=0 removed. kwargs: mesh: custom mesh grids. by default mesh is determined by the @@ -1401,7 +1401,7 @@ def _round_off_to_odd_mesh(mesh): # the conjugation symmetry between the k-points k and -k. # When building the DF integral tensor in function _make_j3c, the symmetry # between k and -k is used (function conj_j2c) to overcome the error - # caused by auxiliary basis linear dependency. More detalis of this + # caused by auxiliary basis linear dependency. More details of this # problem can be found in function _make_j3c. if isinstance(mesh, (int, np.integer)): return (mesh // 2) * 2 + 1 diff --git a/pyscf/pbc/dft/cdft.py b/pyscf/pbc/dft/cdft.py index 0724c5c75f..86076d959e 100644 --- a/pyscf/pbc/dft/cdft.py +++ b/pyscf/pbc/dft/cdft.py @@ -56,8 +56,8 @@ def cdft(mf,cell,offset,orbital,basis=None): # iaoi = a.T[orbital,:] - ##gonna try nomrlaizing to see if that makes life better - ##iaoi = iaoi / numpy.linalg.norm(iaoi) + # gonna try normalizing to see if that makes life better + # iaoi = iaoi / numpy.linalg.norm(iaoi) mf.shift_hamiltonian= numpy.diag(iaoi) * offset mf.constrained_dft = True diff --git a/pyscf/pbc/dft/multigrid/multigrid.py b/pyscf/pbc/dft/multigrid/multigrid.py index af825c787a..23f2bbb83f 100644 --- a/pyscf/pbc/dft/multigrid/multigrid.py +++ b/pyscf/pbc/dft/multigrid/multigrid.py @@ -378,7 +378,7 @@ def get_nuc(mydf, kpts=None): return numpy.asarray(vne) def get_pp(mydf, kpts=None, max_memory=4000): - '''Get the periodic pseudotential nuc-el AO matrix, with G=0 removed. + '''Get the periodic pseudopotential nuc-el AO matrix, with G=0 removed. ''' from pyscf import gto kpts, is_single_kpt = fft._check_kpts(mydf, kpts) diff --git a/pyscf/pbc/dft/multigrid/multigrid_pair.py b/pyscf/pbc/dft/multigrid/multigrid_pair.py index 82068b7d93..6b06199177 100644 --- a/pyscf/pbc/dft/multigrid/multigrid_pair.py +++ b/pyscf/pbc/dft/multigrid/multigrid_pair.py @@ -173,7 +173,7 @@ def _update_task_list(mydf, hermi=0, ngrids=None, ke_ratio=None, rel_cutoff=None hermi_orig = task_list.contents.hermi nlevels = task_list.contents.nlevels rel_cutoff_orig = task_list.contents.gridlevel_info.contents.rel_cutoff - #TODO also need to check kenetic energy cutoff change + #TODO also need to check kinetic energy cutoff change if (hermi_orig > hermi or nlevels != ngrids or abs(rel_cutoff_orig-rel_cutoff) > 1e-12): diff --git a/pyscf/pbc/dft/multigrid/pp.py b/pyscf/pbc/dft/multigrid/pp.py index 13c0813dac..e7e8b65b84 100644 --- a/pyscf/pbc/dft/multigrid/pp.py +++ b/pyscf/pbc/dft/multigrid/pp.py @@ -67,7 +67,7 @@ def make_rho_core(cell, mesh=None, precision=None, atm_id=None): def _get_pp_without_erf(mydf, kpts=None): - '''Get the periodic pseudotential nuc-el AO matrix, with G=0 removed. + '''Get the periodic pseudopotential nuc-el AO matrix, with G=0 removed. ''' cell = mydf.cell if kpts is None: diff --git a/pyscf/pbc/gto/cell.py b/pyscf/pbc/gto/cell.py index 713916526e..e2bd700cc8 100644 --- a/pyscf/pbc/gto/cell.py +++ b/pyscf/pbc/gto/cell.py @@ -497,7 +497,7 @@ def error_for_ke_cutoff(cell, ke_cutoff, omega=None): def get_bounding_sphere(cell, rcut): '''Finds all the lattice points within a sphere of radius rcut. - Defines a parallelipiped given by -N_x <= n_x <= N_x, with x in [1,3] + Defines a parallelepiped given by -N_x <= n_x <= N_x, with x in [1,3] See Martin p. 85 Args: @@ -1536,7 +1536,7 @@ def nimgs(self, x): rcut_guess = estimate_rcut(self, self.precision) if self.rcut > rcut_guess*1.5: msg = ('.nimgs is a deprecated attribute. It is replaced by .rcut ' - 'attribute for lattic sum cutoff radius. The given nimgs ' + 'attribute for lattice sum cutoff radius. The given nimgs ' '%s is far over the estimated cutoff radius %s. ' % (x, rcut_guess)) warnings.warn(msg) diff --git a/pyscf/pbc/gto/pseudo/pp.py b/pyscf/pbc/gto/pseudo/pp.py index b075b141e0..120b76dd38 100644 --- a/pyscf/pbc/gto/pseudo/pp.py +++ b/pyscf/pbc/gto/pseudo/pp.py @@ -227,7 +227,7 @@ def cart2polar(rvec): def get_pp(cell, kpt=np.zeros(3)): - '''Get the periodic pseudotential nuc-el AO matrix + '''Get the periodic pseudopotential nuc-el AO matrix ''' from pyscf.pbc import tools coords = cell.get_uniform_grids() diff --git a/pyscf/pbc/gto/pseudo/test/test_pp.py b/pyscf/pbc/gto/pseudo/test/test_pp.py index 95b343bbf6..1db8d375b6 100644 --- a/pyscf/pbc/gto/pseudo/test/test_pp.py +++ b/pyscf/pbc/gto/pseudo/test/test_pp.py @@ -117,7 +117,7 @@ def get_pp_nl(cell, kpt=np.zeros(3)): def get_pp(cell, kpt=np.zeros(3)): - '''Get the periodic pseudotential nuc-el AO matrix, with G=0 removed. + '''Get the periodic pseudopotential nuc-el AO matrix, with G=0 removed. ''' coords = gen_grid.gen_uniform_grids(cell) aoR = numint.eval_ao(cell, coords, kpt) diff --git a/pyscf/pbc/gw/krgw_ac.py b/pyscf/pbc/gw/krgw_ac.py index 6d56b0411e..68561576bc 100644 --- a/pyscf/pbc/gw/krgw_ac.py +++ b/pyscf/pbc/gw/krgw_ac.py @@ -20,7 +20,7 @@ PBC spin-restricted G0W0-AC QP eigenvalues with k-point sampling This implementation has N^4 scaling, and is faster than GW-CD (N^4) and analytic GW (N^6) methods. -GW-AC is recommended for valence states only, and is inaccuarate for core states. +GW-AC is recommended for valence states only, and is inaccurate for core states. Method: See T. Zhu and G.K.-L. Chan, arxiv:2007.03148 (2020) for details diff --git a/pyscf/pbc/gw/kugw_ac.py b/pyscf/pbc/gw/kugw_ac.py index 1dab492230..30b3960bdc 100644 --- a/pyscf/pbc/gw/kugw_ac.py +++ b/pyscf/pbc/gw/kugw_ac.py @@ -18,7 +18,7 @@ ''' PBC spin-unrestricted G0W0-AC QP eigenvalues with k-point sampling -GW-AC is recommended for valence states only, and is inaccuarate for core states. +GW-AC is recommended for valence states only, and is inaccurate for core states. Method: See T. Zhu and G.K.-L. Chan, arxiv:2007.03148 (2020) for details diff --git a/pyscf/pbc/lib/linalg_helper.py b/pyscf/pbc/lib/linalg_helper.py index b6949f20ca..f2e1b1aa0f 100644 --- a/pyscf/pbc/lib/linalg_helper.py +++ b/pyscf/pbc/lib/linalg_helper.py @@ -649,7 +649,7 @@ def solve_iter(self): if tmp <= self.crit_e: nconv1+=1 if VERBOSE: print(' No. of converged eigval:',nconv1) if nconv1 == neig: - if VERBOSE: print(' Cong: all eignvalues converged ! ') + if VERBOSE: print(' Cong: all eigenvalues converged ! ') eigs = teig.copy() # Full Residuals: Res[i]=Res'[i]-w[i]*X[i] diff --git a/pyscf/pbc/scf/cphf.py b/pyscf/pbc/scf/cphf.py index 48ca53812a..e4f75fe3f4 100644 --- a/pyscf/pbc/scf/cphf.py +++ b/pyscf/pbc/scf/cphf.py @@ -17,7 +17,7 @@ # ''' -Restricted coupled pertubed Hartree-Fock solver +Restricted coupled perturbed Hartree-Fock solver Modified from pyscf.scf.cphf ''' diff --git a/pyscf/pbc/scf/rsjk.py b/pyscf/pbc/scf/rsjk.py index f578e56363..43877e18b6 100644 --- a/pyscf/pbc/scf/rsjk.py +++ b/pyscf/pbc/scf/rsjk.py @@ -422,7 +422,7 @@ def _get_jk_sr(self, dm_kpts, hermi=1, kpts=None, kpts_band=None, subset_only = intersection(kpts, kpts_band).size == len(kpts_band) if not subset_only: log.warn('Approximate J/K matrices at kpts_band ' - 'with the bvk-cell dervied from kpts') + 'with the bvk-cell derived from kpts') expLk = np.exp(1j*np.dot(supmol.bvkmesh_Ls, kpts_band.T)) vs = lib.einsum('snpRq,Rk->snkpq', vs, expLk) vs = np.asarray(vs, order='C') diff --git a/pyscf/pbc/tdscf/kproxy.py b/pyscf/pbc/tdscf/kproxy.py index 2482279742..3eaec3f177 100644 --- a/pyscf/pbc/tdscf/kproxy.py +++ b/pyscf/pbc/tdscf/kproxy.py @@ -13,7 +13,7 @@ * `pyscf.pbc.tdscf.kproxy_supercell`: PBC implementation constructing supercells. Works with an arbitrary number of k-points but has an overhead due to ignoring the momentum conservation law. In addition, works only with time reversal invariant (TRI) models: i.e. the k-point grid has to be aligned and contain at least one TRI momentum. - * (this module) `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonlizes smaller + * (this module) `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonalizes smaller matrices (the performance gain is the total number of k-points in the model). """ diff --git a/pyscf/pbc/tdscf/kproxy_supercell.py b/pyscf/pbc/tdscf/kproxy_supercell.py index 3a6ac22d1c..eedc18c410 100644 --- a/pyscf/pbc/tdscf/kproxy_supercell.py +++ b/pyscf/pbc/tdscf/kproxy_supercell.py @@ -13,7 +13,7 @@ * (this module) `pyscf.pbc.tdscf.kproxy_supercell`: PBC implementation constructing supercells. Works with an arbitrary number of k-points but has an overhead due to ignoring the momentum conservation law. In addition, works only with time reversal invariant (TRI) models: i.e. the k-point grid has to be aligned and contain at least one TRI momentum. - * `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonlizes smaller + * `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonalizes smaller matrices (the performance gain is the total number of k-points in the model). """ diff --git a/pyscf/pbc/tdscf/proxy.py b/pyscf/pbc/tdscf/proxy.py index 3f6e78d702..3686b05d40 100644 --- a/pyscf/pbc/tdscf/proxy.py +++ b/pyscf/pbc/tdscf/proxy.py @@ -12,7 +12,7 @@ * `pyscf.pbc.tdscf.kproxy_supercell`: PBC implementation constructing supercells. Works with an arbitrary number of k-points but has an overhead due to ignoring the momentum conservation law. In addition, works only with time reversal invariant (TRI) models: i.e. the k-point grid has to be aligned and contain at least one TRI momentum. - * `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonlizes smaller + * `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonalizes smaller matrices (the performance gain is the total number of k-points in the model). """ diff --git a/pyscf/pbc/tools/pbc.py b/pyscf/pbc/tools/pbc.py index ed44d91bbe..504daa85b3 100644 --- a/pyscf/pbc/tools/pbc.py +++ b/pyscf/pbc/tools/pbc.py @@ -685,7 +685,7 @@ def _build_supcell_(supcell, cell, Ls): _env = np.append(cell._env, coords.ravel()) _atm = np.repeat(cell._atm[None,:,:], nimgs, axis=0) _atm = _atm.reshape(-1, ATM_SLOTS) - # Point to the corrdinates appended to _env + # Point to the coordinates appended to _env _atm[:,PTR_COORD] = cell._env.size + np.arange(nimgs * cell.natm) * 3 _bas = np.repeat(cell._bas[None,:,:], nimgs, axis=0) diff --git a/pyscf/scf/cphf.py b/pyscf/scf/cphf.py index 73cbdc2010..cda7b94d56 100644 --- a/pyscf/scf/cphf.py +++ b/pyscf/scf/cphf.py @@ -17,7 +17,7 @@ # ''' -Restricted coupled pertubed Hartree-Fock solver +Restricted coupled perturbed Hartree-Fock solver ''' diff --git a/pyscf/scf/dhf.py b/pyscf/scf/dhf.py index 242a6c3dc5..ac71eae0fe 100644 --- a/pyscf/scf/dhf.py +++ b/pyscf/scf/dhf.py @@ -93,7 +93,7 @@ def energy_elec(mf, dm=None, h1e=None, vhf=None): Kwargs: dm : 2D ndarray - one-partical density matrix + one-particle density matrix h1e : 2D ndarray Core hamiltonian vhf : 2D ndarray diff --git a/pyscf/scf/hf.py b/pyscf/scf/hf.py index 7c270369e8..3b9475616c 100644 --- a/pyscf/scf/hf.py +++ b/pyscf/scf/hf.py @@ -251,7 +251,7 @@ def energy_elec(mf, dm=None, h1e=None, vhf=None): Kwargs: dm : 2D ndarray - one-partical density matrix + one-particle density matrix h1e : 2D ndarray Core hamiltonian vhf : 2D ndarray diff --git a/pyscf/scf/ucphf.py b/pyscf/scf/ucphf.py index ef8b7ae068..e225dff496 100644 --- a/pyscf/scf/ucphf.py +++ b/pyscf/scf/ucphf.py @@ -17,7 +17,7 @@ # ''' -Unrestricted coupled pertubed Hartree-Fock solver +Unrestricted coupled perturbed Hartree-Fock solver ''' diff --git a/pyscf/symm/addons.py b/pyscf/symm/addons.py index ea508de250..ce1295e1bb 100644 --- a/pyscf/symm/addons.py +++ b/pyscf/symm/addons.py @@ -197,7 +197,7 @@ def symmetrize_space(mol, mo, s=None, '''Symmetrize the given orbital space. This function is different to the :func:`symmetrize_orb`: In this function, - the given orbitals are mixed to reveal the symmtery; :func:`symmetrize_orb` + the given orbitals are mixed to reveal the symmetry; :func:`symmetrize_orb` projects out non-symmetric components for each orbital. Args: @@ -489,7 +489,7 @@ def irrep_id2name(gpname, irrep_id): See IRREP_ID_TABLE in pyscf/symm/param.py Returns: - Irrep sybmol, str + Irrep symbol, str ''' gpname = std_symb(gpname) if gpname == 'SO3': diff --git a/pyscf/tdscf/proxy.py b/pyscf/tdscf/proxy.py index eec7f97808..ef9b50f48e 100644 --- a/pyscf/tdscf/proxy.py +++ b/pyscf/tdscf/proxy.py @@ -12,7 +12,7 @@ * `pyscf.pbc.tdscf.kproxy_supercell`: PBC implementation constructing supercells. Works with an arbitrary number of k-points but has an overhead due to ignoring the momentum conservation law. In addition, works only with time reversal invariant (TRI) models: i.e. the k-point grid has to be aligned and contain at least one TRI momentum. - * `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonlizes smaller + * `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonalizes smaller matrices (the performance gain is the total number of k-points in the model). """