From: David Fischermeier (david.fischermeier_at_gmail.com)
Date: Fri Dec 08 2017 - 06:14:49 CST

Hello fellow researchers,

I have recently discoverd the FFTK plugin of VMD for the parametrization of
smaller molecules (<50 Atoms).

However I am encountering an issue while optimizing the charges in the Opt.
Charges menu.

*This is the Error Dialogue popping up:*

=============================
domain error: argument not in valid range
domain error: argument not in valid range
    while executing
"expr {$term / $sum}"
    (procedure "vecnorm" line 5)
    invoked from within
"vecnorm $dipoleMMvec"
    (procedure "::ForceFieldToolKit::ChargeOpt::optCharges" line 141)
    invoked from within
"$function $p0list"
    (procedure "construct_initial_complex" line 13)
    invoked from within
"construct_initial_complex [lindex $args 0]"
    (procedure "::Optimize::Opt12::handle" line 89)
    invoked from within
"$opt initsimplex [lrange $chargeInit 0 end-1] "
    (procedure "::ForceFieldToolKit::ChargeOpt::optimize" line 409)
    invoked from within
"::ForceFieldToolKit::ChargeOpt::optimize"
    (procedure "::ForceFieldToolKit::gui::coptRunOpt" line 55)
    invoked from within
"::ForceFieldToolKit::gui::coptRunOpt "
    invoked from within
".fftk_gui.hlf.nb.chargeopt.runOpt invoke "
    invoked from within
".fftk_gui.hlf.nb.chargeopt.runOpt instate {pressed !disabled} {
.fftk_gui.hlf.nb.chargeopt.runOpt state !pressed;
.fftk_gui.hlf.nb.chargeopt.runOpt in..."
    (command bound to event)
=====================================

*This is the gaussian command input I am using:*

-------------------------------------------------------------------------------
# HF/6-31G* Opt=(Z-matrix,MaxCycles=100) Geom=PrintInputOrient

which is as FFTK generates it.
-------------------------------------------------------------------------------

*The debug file (ChargeOpt.debug.log)*

==========================================
 Charge Optimization GUI Debugging Output
==========================================
INPUT SECTION
psfPath: /home/fischerd/SQA_GMX/FFTK/T3/3-WATER/DBT/DBT_gen.psf
pdbPath: /home/fischerd/SQA_GMX/FFTK/T3/3-WATER/DBT/DBT_gen.pdb
resName: DBT
parList:
    /home/fischerd/SQA_GMX/FFTK/T3/3-WATER/DBT/par_SAB.LJ.prm
    /home/fischerd/SQA_GMX/FFTK/T3/par_all36_cgenff.prm
log file: ChargeOpt.log
-------------------------------------------
CHARGE CONSTRAINTS SECTION
chargeGroups: CBTC HBTC CSQ3 CSQ4 CSQ5 CSQ6 NSQ1 CSQ7 NSQ2 CSQ2 OSQ2 CSQ1
CBBT HBBT C2I2 C2I1 {C2I3 C2I4} {H2I1 H2I2 H2I3 H2I4 H2I5 H2I6} N2I1 C2I5
{H2I7 H2I8 H2I9} C1I6 C1I1 C1I5 H1I5 C1I2 H1I2 C1I4 H1I4 C1I3 H1I3 {HCA1
HCA2}
chargeInit: 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000
chargeBounds: {-1.0 1.0} {0.0 1.0} {-1.0 1.0} {-1.0 1.0} {-1.0 1.0} {-1.0
1.0} {-1.0 1.0} {-1.0 1.0} {-1.0 1.0} {-1.0 1.0} {-1.0 1.0} {-1.0 1.0}
{-1.0 1.0} {0.0 1.0} {-1.0 1.0} {-1.0 1.0} {-1.0 1.0} {0.0 1.0} {-1.0 1.0}
{-1.0 1.0} {0.0 1.0} {-1.0 1.0} {-1.0 1.0} {-1.0 1.0} {0.0 1.0} {-1.0 1.0}
{0.0 1.0} {-1.0 1.0} {0.0 1.0} {-1.0 1.0} {0.0 1.0} {0.0 1.0}
chargeSum: 0.00
-------------------------------------------
QM TARGET DATA SECTION
baseHFLog: /home/fischerd/SQA_GMX/FFTK/T3/3-WATER/DBT/FDBT-sp-HF.out/opt.log
baseMP2Log:
/home/fischerd/SQA_GMX/FFTK/T3/3-WATER/DBT/FDBT-sp-MP2.out/opt.log
watLog: /home/fischerd/SQA_GMX/FFTK/T3/3-WATER/DBT/Fwat-sp.out/opt.log
logFileList:

/home/fischerd/SQA_GMX/FFTK/T3/3-WATER/DBT/FDBT-DON-H1I4.out/rawDBT-DON-H1I4.log
atomList: H1I4
indWeights: 1.0
-------------------------------------------
ADVANCED SETTINGS SECTION
start: -0.4
end: 0.4
delta: 0.05
end: 0.4
offset: -0.2
scale: 1.16
tol: 0.005
dWeight: 1.0
dipoleWeight: 1.0
Optimization mode: downhill
Simulated Annealing Parameters: Temp. 25, Steps 20, Iterations 15
Override ReChargeFromPSF: 0
Override Charges:
debug: 1
==========================================

QME(water): -47665.46269478201
QME(cmpd): -630405.808215399
scaled QMEn: -2.9972034683614037
QMDist (unshifted): 2.4745562076568604
QM Standard Orientation Coordinates:
4.600485 -2.070308 -0.120677
5.388393 -1.321594 -0.168832
3.321355 -1.505610 -0.049336
2.947888 -0.108060 -0.007492
3.659839 1.089510 0.040500
2.990879 2.345777 0.060656
2.422076 3.356064 0.071491
5.081949 1.102126 0.092816
6.239463 1.089845 0.140782
1.888535 -1.872438 -0.030550
1.257643 -2.916932 -0.022443
1.539962 -0.436898 -0.025950
0.444269 0.429907 -0.048275
0.742023 1.475584 -0.056724
-0.930592 0.225870 -0.050105
-1.752452 -1.063860 0.020898
-1.529571 -1.934162 -1.229534
-2.242304 -2.771391 -1.217818
-1.702126 -1.356010 -2.149128
-0.516820 -2.352011 -1.232886
-1.456254 -1.852091 1.308119
-2.170086 -2.684496 1.396357
-0.447272 -2.277073 1.276256
-1.568519 -1.214195 2.197538
-1.781821 1.283022 -0.112566
-1.401059 2.685083 -0.207654
-0.497929 2.763056 -0.828928
-2.200889 3.194235 -0.760777
-1.164254 3.341056 1.151656
-3.122968 0.870393 -0.038218
-3.165229 -0.519625 0.038708
-4.274571 1.646370 -0.037195
-4.236796 2.735123 -0.083956
-4.385428 -1.170436 0.110364
-4.435246 -2.260380 0.168239
-5.500067 0.980439 0.036278
-6.423437 1.561942 0.040740
-5.559323 -0.409867 0.108614
-6.528964 -0.908200 0.166340
4.652856 -2.645492 -0.936918
4.746317 -2.639926 0.688640
QM Dipole Vector: -10.8881 -1.2978 -0.5929
QM Dipole Magnitude: 10.9812

Reference trajectory loaded: 81
Shift trajectories loaded: 82

241 elements added to ljPar array
41 elements added to atomInfo array
697 elements added to atomDist

any help is gladly appreciated.
regards David