Skip to content

Commit

Permalink
typos and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton authored and sunqm committed Jul 17, 2024
1 parent ebf4e67 commit 8be06f8
Show file tree
Hide file tree
Showing 52 changed files with 73 additions and 73 deletions.
2 changes: 1 addition & 1 deletion examples/mcscf/14-project_init_guess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'''

Expand Down
4 changes: 2 additions & 2 deletions examples/pbc/20-k_points_scf_ksymm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion examples/tddft/31-energy_transfer_coupling_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion pyscf/dft/dks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyscf/dft/numint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyscf/dft/rks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyscf/fci/direct_nosym.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down
10 changes: 5 additions & 5 deletions pyscf/fci/direct_spin1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions pyscf/gto/mole.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyscf/gw/gw_ac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyscf/gw/ugw_ac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyscf/lib/cc/ccsd_pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion pyscf/lib/gto/autocode/parser.cl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyscf/lib/linalg_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyscf/lib/mcscf/fci_contract.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions pyscf/lib/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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]

Expand Down
8 changes: 4 additions & 4 deletions pyscf/lib/solvent/mnsol.F
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion pyscf/mcscf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyscf/mcscf/apc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pyscf/md/integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'''
Expand Down
2 changes: 1 addition & 1 deletion pyscf/mp/mp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyscf/mp/ump2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pyscf/pbc/ci/kcis_rhf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyscf/pbc/df/aft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyscf/pbc/df/df.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyscf/pbc/df/fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyscf/pbc/df/gdf_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyscf/pbc/df/mdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyscf/pbc/df/rsdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyscf/pbc/df/rsdf_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 8be06f8

Please sign in to comment.