Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Electrostatics a little bit repaired and updated
  • Loading branch information
ondrejkrejci committed Nov 9, 2018
1 parent 5737ed4 commit 31494db
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 deletions.
4 changes: 4 additions & 0 deletions examples/CoPc-IETS/clean.sh
@@ -0,0 +1,4 @@
#!/bin/bash
rm -r Q0.*
rm FF*
echo "Directory cleaned"
5 changes: 3 additions & 2 deletions examples/CoPc-IETS/params.ini
Expand Up @@ -3,10 +3,11 @@ charge 0.0 # effective charge of probe particle [e]
stiffness 0.24 0.24 20.00 # [N/m] harmonic spring potential (x,y,R) components, x,y is bending stiffnes, R particle-tip bond-length stiffnes,
r0Probe 0.0 0.0 4.00 # [Ă…] equilibirum position of probe particle (x,y,R) components, R is bond length, x,y introduce tip asymmetry
PBC True # Periodic boundary conditions ? [ True/False ]
gridN 253 253 247
gridA 20.4499999999999993 0.0000000000000000 0.0000000000000000
gridB 0.0000000000000000 20.2444671453708587 0.0000000000000000
gridC 0.0000000000000000 0.0000000000000000 20.0000000000000000 # vectors from cell lvs (z-highered to 20)
scanMin 3.0 1.0 9.5 # start of scanning (x,y,z) 2.7 + 6.8 =
scanMax 22.0 20.0 11.5 # end of scanning (x,y,z)
scanMin 3.03 1.03 9.5 # start of scanning (x,y,z) 2.7 + 6.8 = 9.5 ; x and y are shftted in order to reduce amount of negative eigenfrequencies #
scanMax 22.03 20.03 11.5 # end of scanning (x,y,z)
scanStep 0.10 0.10 0.10
Amplitude 1.0 # [Ă…] oscilation amplitude for conversion Fz->df
4 changes: 4 additions & 0 deletions examples/Graphene-spline/clean.sh
@@ -0,0 +1,4 @@
#!/bin/bash
rm -r Q-0.00*
rm FF*
echo "Directory cleaned"
4 changes: 4 additions & 0 deletions examples/Graphene/clean.sh
@@ -0,0 +1,4 @@
#!/bin/bash
rm -r Q-0.*
rm FF*
echo "Directory cleaned"
6 changes: 6 additions & 0 deletions examples/PTCDA_Hartree/clean.sh
@@ -0,0 +1,6 @@
#!/bin/bash
rm -r Q-0.*
rm -r Q0.*
rm FF*
rm LOCPOT*
echo "Directory cleaned"
6 changes: 6 additions & 0 deletions examples/PTCDA_Hartree_dz2/clean.sh
@@ -0,0 +1,6 @@
#!/bin/bash
rm -r Q-0.*
rm -r Q0.*
rm FF*
rm LOCPOT*
echo "Directory cleaned"
4 changes: 3 additions & 1 deletion pyProbeParticle/fieldFFT.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python

import numpy as np
import GridUtils

def getSampleDimensions(lvec):
'returns lvec without the first row'
Expand Down Expand Up @@ -97,7 +98,7 @@ def getProbeDensity( sampleSize, X, Y, Z, dd, sigma=0.7, multipole_dict=None ):
if multipole_dict is not None: # multipole_dict should be dictionary like { 's': 1.0, 'pz':0.1545 , 'dz2':-0.24548 }
rho = np.zeros( np.shape(radial) )
for kind, coef in multipole_dict.iteritems():
rho += radial * coef * getSphericalHarmonic( X/sigma, Y/sigma, Z/sigma, kind=kind )
rho += radial * coef * getSphericalHarmonic( rx/sigma, ry/sigma, rz/sigma, kind=kind )
else:
rho = radial
return rho
Expand Down Expand Up @@ -185,6 +186,7 @@ def potential2forces( V, lvec, nDim, sigma = 0.7, rho=None, multipole=None):
if rho == None:
print '--- Get Probe Density ---'
rho = getProbeDensity(sampleSize, X, Y, Z, dd, sigma=sigma, multipole_dict=multipole)
#GridUtils.saveXSF("rho_tip.xsf", rho, lvec)
else:
rho[:,:,:] = rho[::-1,::-1,::-1].copy()
print '--- Get Forces ---'
Expand Down

0 comments on commit 31494db

Please sign in to comment.