Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
miniff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Quantum Tinkerer
miniff
Commits
e041972a
Commit
e041972a
authored
3 years ago
by
Artem Pulkin
Browse files
Options
Downloads
Patches
Plain Diff
util: remove obsolete
parent
7b067db5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
miniff/util.py
+0
-36
0 additions, 36 deletions
miniff/util.py
with
0 additions
and
36 deletions
miniff/util.py
+
0
−
36
View file @
e041972a
...
...
@@ -185,42 +185,6 @@ def dict_reduce(d, operation):
return
{
k
:
operation
(
v
)
for
k
,
v
in
result
.
items
()}
def
pyscf_coulomb_ewald
(
cell
,
charges
=
None
,
eta
=
None
,
r_cut
=
None
,
k_cut
=
None
):
"""
Computes electrostatic energy with Ewald summations using pyscf.
Parameters
----------
cell : Cell
The cell.
charges : np.ndarray
Electrostatic charges in units of electron charge.
eta : float
r_cut : float
k_cut : float
Ewald summation parameters.
Returns
-------
result : float
The total electrostatic energy value in atomic units.
"""
from
pyscf.pbc.gto
import
Cell
as
pyscf_cell
if
charges
is
None
:
if
"
charges
"
not
in
cell
.
meta
:
raise
ValueError
(
"
No charges specified
"
)
charges
=
cell
.
meta
[
"
charges
"
]
c
=
pyscf_cell
(
a
=
cell
.
vectors
,
atom
=
zip
([
'
na
'
]
*
cell
.
size
,
cell
.
cartesian
()))
c
.
unit
=
'
B
'
if
k_cut
is
not
None
:
c
.
ke_cutoff
=
k_cut
**
2
/
2
c
.
ew_eta
=
eta
c
.
ew_cut
=
r_cut
c
.
build
()
c
.
atom_charges
=
lambda
:
np
.
array
(
charges
)
return
c
.
ewald
()
def
cartesian
(
arrays
):
"""
Cartesian product of many coordinate arrays.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment