-
Notifications
You must be signed in to change notification settings - Fork 17
/
scaleLJ
executable file
·716 lines (608 loc) · 26.3 KB
/
scaleLJ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
#!/usr/bin/env python
# scaleLJ - scale epsilon and sigma LJ parameters in pair.lmp LAMMPS file.
# Agilio Padua <[email protected]>
# Kateryna Goloviznina <[email protected]>
# version 2023/11/02
import sys
import argparse
import os
usage = """
==============================================================================
Scale epsilon and sigma LJ parameters in pair.lmp LAMMPS file
------------------------------------------------------------------------------
Format of file containing specification of Drude oscillators
and polarisability values (alpha.ff):
# type dm/u dq/e k/(kJ/molA2) alpha/A3 a_thole
CT 0.4 -1.0 4184.0 1.016 2.6
...
* dm is the mass to place on the Drude particle (taken from its core),
* dq is the charge to place on the Drude particle (taken from its core),
* k is the harmonic force constant of the bond between core and Drude,
* alpha is the polarizability, hyrdogen aroms are not merged,
* a_thole is a parameter of the Thole damping function.
------------------------------------------------------------------------------
Format of file containing monomers and dimers specification (fragment.ff)
MONOMERS
# name q/e mu/D
c2c1im 1.0 1.1558
..
DIMERS
# m1 m2 r_COM/A k_sapt
c2c1im dca 2.935 0.61
...
* q is the charge of the monomer,
* mu is the dipole moment of the monomer,
* m1 and m2 are the monomers forming a dimer,
* r_COM distance between the center of mass of the monomers,
* k_sapt is the scaling factor for the epsilon of LJ potential,
obtained by SAPT quantum calculation (optional).
------------------------------------------------------------------------------
Format of file containing fragments list with atomic indices (fragment.inp)
#name indices
c2c1im 1:10
dca 11:13
...
* atomic indices or/and a range of indices that correspond to atomic types
associating with this fragment in data.lmp file.
------------------------------------------------------------------------------
Script requires structure files of monomers used in fragment.inp file
(.zmat, .xyz, .mol, .pdb)
==============================================================================
"""
class _Const(object):
sigma_k = 0.985
# C0 and C1 are coefficients to predict k
@staticmethod
def C0():
return 0.254952
@staticmethod
def C1():
return 0.106906
@staticmethod
def isfloat(value):
try:
float(value)
return True
except ValueError:
return False
class Monomer (object):
'''monomer in fragment.ff'''
def __init__(self, name, q, mu):
self.name = name
self.q = q
self.mu = mu
def __str__(self):
return f'{self.name:10s} q = {self.q:2d} mu = {self.mu:6.4f} D'
class Dimer (object):
'''dimer in fragment.ff'''
def __init__(self, m1, m2):
self.m1 = m1
self.m2 = m2
self.r = None
self.k_sapt = None
def SetR(self, r):
self.r = r
def SetKSAPT(self, k_sapt):
self.k_sapt = k_sapt
def __str__(self):
res = f'{self.m1.name:10s} {self.m2.name:10s}'
if self.r is not None:
res += f' r = {self.r:6.4f}'
if self.k_sapt is not None:
res += f' k_sapt = {self.k_sapt:4.2f}'
return res
class Forcefield(object):
'''fragment force field from fragment.ff'''
def __init__(self, filename):
'''read fragment.ff'''
self.filename = filename
self.monomers = []
self.dimers= []
try:
with open(self.filename, 'r') as f:
for line in f:
if line.startswith('#') or line.strip() == '':
continue
if line.lower().startswith('monomer'):
section = 'monomers'
continue
elif line.lower().startswith('dimer'):
section = 'dimers'
continue
tok = line.strip().split()
if section == 'monomers':
if tok[0].endswith('+') or tok[0].endswith('-'):
tok[0] = tok[0][:-1]
name = tok[0].lower()
q = float(tok[1])
mu = float (tok[2])
if next((x for x in self.monomers if x.name == name), None) is not None:
raise Exception(f' error: monomer {name} is specified twice in {self.filename}')
self.monomers.append(Monomer(name, q, mu))
elif section == 'dimers':
for i in range(0,2):
if tok[i].endswith('+') or tok[i].endswith('-'):
tok[i] = tok[i][:-1]
m1_name = tok[0].lower()
m2_name = tok[1].lower()
r = float (tok[2])
if next((x for x in self.dimers if (x.m1.name == m1_name and x.m2.name == m2_name) or (x.m1.name == m2_name and x.m2.name == m1_name)), None):
raise Exception(f' error: dimer {m1_name} {m2_name} is specified twice in {self.filename}')
d = self.SetDimer(m1_name, m2_name)
self.dimers.append(d)
d.SetR(r)
if len(tok)>3:
k_sapt = float (tok[3])
d.SetKSAPT(k_sapt)
except IOError:
print(f' error: force field file {self.filename} not found')
sys.exit(1)
except IndexError:
print(f' error: incorrect force field file line: {line}')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
def SetDimer(self, m1_name, m2_name):
'''create dimer from two monomers'''
try:
m1 = next((x for x in self.monomers if x.name == m1_name), None)
m2 = next((x for x in self.monomers if x.name == m2_name), None)
if (m1 is not None and m2 is not None):
d = Dimer(m1, m2)
return d
else:
raise Exception(f' error: monomer {m1_name} or {m2_name} not described in monomers section of {self.filename}')
except Exception as e:
print(e)
sys.exit(1)
def __str__(self):
res = self.filename
res += '\nMONOMERS'
for m in self.monomers:
res+='\n'+str(m)
res += '\nDIMERS'
for d in self.dimers:
res+='\n'+str(d)
return res
class Fragment(Monomer):
"""
a fragment in frag.inp
fragment is based on monomer with index range in current system added
"""
def __init__(self, m, ind_range, res):
self.name = m.name
self.q = m.q
self.mu = m.mu
self.ind_range = ind_range
self.pol_model = res[0]
self.scale_eps = res[1]
self.scale_sig = False
def __str__(self):
return '{0:10s} q = {1:5.2f} mu = {2:6.4f} D Pol = {3:5s} ScaleEps = {4:5s} ScaleSig = {5:5s} Atoms = {5:s} '.format(self.name, self.q, self.mu, self.pol_model, self.scale_eps, self.scale_sig, self.ind_range)
@staticmethod
def PolExclude(m, p):
'''check if fragment is polarisable'''
pol_model = False
scale_eps = True
if p is not None:
if m.name in p:
pol_model = True
if (m.q == 0 and m.mu == 0):
scale_eps = False
return (pol_model, scale_eps)
def GetAtomsFromMol(self, pol):
'''read atoms from .mol for a given fragment'''
try:
filename = self.name + '.mol'
with open(filename, 'r') as f:
atoms = []
tok = f.readline().strip().split()
self.name = tok[0]
f.readline()
f.readline()
tok = f.readline().strip().split() # counts line
natom = int(tok[0])
for i in range(natom):
tok = f.readline().strip().split()
at_name = tok[3]
print(at_name)
atom = next((x for x in pol.atomtypes if x.name == at_name), None)
if atom is not None:
atoms.append(atom)
else:
print(f'warning: error: atom type {at_name} not found in {pol.filename}')
self.atoms = atoms
except IOError:
print(' error: fragment mol file {filename} not found')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
def GetAtomsFromPdb(self, pol):
'''read atoms from .pdb for a given fragment'''
try:
filename = self.name + '.pdb'
with open(filename, 'r') as f:
atoms = []
line = f.readline()
while 'COMPND' not in line:
line = f.readline()
tok = line.strip().split()
self.name = tok[1]
line = f.readline()
while not (line.startswith('ATOM') or line.startswith('HETATM')):
line = f.readline()
while 'ATOM' in line or 'HETATM' in line:
tok = line.strip().split()
at_name = tok[2]
atom = next((x for x in pol.atomtypes if x.name == at_name), None)
if atom is not None:
atoms.append(atom)
else:
print(f'warning: error: atom type {at_name} not found in {pol.filename}')
line = f.readline()
self.atoms = atoms
except IOError:
print(' error: fragment pdb file {filename} not found')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
def GetAtomsFromZmat(self, pol):
'''read atoms from .zmat for a given fragment'''
try:
filename = self.name + '.zmat'
with open(filename, 'r') as f:
atoms = []
line = f.readline()
while line.strip().startswith('#'):
line = f.readline()
#fr_name = line.strip()
line = f.readline()
while line.strip().startswith('#') or line.strip() == '':
line = f.readline()
tok = line.strip().split()
if len(tok) > 1: # there can be line numbers
shift = 1
else:
shift = 0
while line:
tok = line.strip().split()
if len(tok) == 0:
break
at_name = tok[shift]
atom = next((x for x in pol.atomtypes if x.name == at_name), None)
if atom is not None:
atoms.append(atom)
else:
print(f'warning: error: atom type {at_name} not found in {pol.filename}')
line = f.readline()
self.atoms = atoms
except IOError:
print(' error: fragment zmat file {filename} not found')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
def GetAtomsFromXYZ(self, pol):
'''read atoms from .xyz for a given fragment'''
try:
filename = self.name + '.xyz'
with open(filename, 'r') as f:
atoms = []
line = f.readline()
while line.strip().startswith('#'):
line = f.readline()
#n_atoms = int(line.strip())
line = f.readline()
#fr_name = line.strip()
line = f.readline()
while line.strip().startswith('#') or line.strip() == '':
line = f.readline()
tok = line.strip().split()
while line:
tok = line.strip().split()
if len(tok) == 0:
break
at_name = tok[0]
atom = next((x for x in pol.atomtypes if x.name == at_name), None)
if atom is not None:
atoms.append(atom)
else:
print(f'warning: error: atom type {at_name} not found in {pol.filename}')
line = f.readline()
self.atoms = atoms
except IOError:
print(f' error: fragment xyz file {filename} not found')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
class FragmentPair(Dimer):
'''fragment pair based on dimer but uses fragments (not monomers) as units'''
def __init__(self, fr1, fr2, r, k_sapt):
self.fr1 = fr1
self.fr2 = fr2
self.r = r
self.k_sapt = k_sapt
def __str__(self):
res = f'{self.fr1.name:10s} {self.fr2.name:10s}'
if self.r is not None:
res += f' r = {self.r:6.4f}'
if self.k_sapt is not None:
res += f' k_sapt = {self.k_sapt:4.2f}'
return res
def PredictK(self):
"""
predict k factor for a given fragment pair based on:
total charge, alpha, dipole moment of fragment and interfragment distance
"""
alpha_fr1 = [sum(x.alpha for x in self.fr1.atoms)][0]
alpha_fr2 = [sum(x.alpha for x in self.fr2.atoms)][0]
k_pred = 1.0
if not self.fr1.pol_model:
k_pred += _Const.C0()*self.r*self.r*(self.fr2.q*self.fr2.q)/alpha_fr2
k_pred += _Const.C1()*(self.fr2.mu*self.fr2.mu)/alpha_fr2
if not self.fr2.pol_model:
k_pred += _Const.C0()*self.r*self.r*(self.fr1.q*self.fr1.q)/alpha_fr1
k_pred += _Const.C1()*(self.fr1.mu*self.fr1.mu)/alpha_fr1
k_pred = 1/k_pred
self.k_pred = k_pred
class AtomType(object):
'''atom type with polarisability value'''
def __init__(self, name, alpha):
self.name = name
self.alpha = alpha
def __str__(self):
return f'{self.name} {self.alpha:6.3f}'
class Polarisation(object):
'''polarisability values for all atom types; from alpha.ff'''
def __init__(self, filename):
self.filename = filename
self.atomtypes = []
try:
with open(self.filename, 'r') as f:
for line in f:
line = line.strip()
if line.startswith('#') or len(line) == 0:
continue
tok = line.split()
a_name = tok[0]
a_alpha = float(tok[4])
if next((x for x in self.atomtypes if x.name == a_name), None) is not None:
raise Exception(f' error: atom type {a_name} is specified twice in {self.filename}')
self.atomtypes.append(AtomType(a_name, a_alpha))
except IOError:
print(f' error: polarisation file {self.filename} not found')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
def __str__(self):
res = self.filename
for at in self.atomtypes:
res += '\n' + str(at)
return res
class System(object):
'''system that consist of fragments from fragment.inp'''
def __init__(self, filename):
self.fragments = []
self.fragmentpairs = []
self.filename = filename
def GetFragments(self, ff, p):
'''read fragments from fragment.inp'''
try:
with open(self.filename, 'r') as f:
for line in f:
if line.startswith('#') or line.strip() == '':
continue
else:
tok = line.strip().split()
m_name = tok[0].lower()
if next((x for x in self.fragments if x.name == m_name), None) is not None:
raise Exception(f' error: fragment {m_name} is specified twice in {self.filename}')
if len(tok)<2:
raise Exception(f' error: no index range for {m_name} fragment in {self.filename}')
ind_range = []
for ind in tok[1:]:
if ':' in ind:
tok_ind = ind.split(':')
ind_range.extend(range(int(tok_ind[0]), int(tok_ind[1])+1))
else:
ind_range.append(int(ind))
m = next((x for x in ff.monomers if x.name == m_name), None)
if m is None:
raise Exception(f' error: fragment {m_name} not found in {ff.filename}')
self.fragments.append(Fragment(m, ind_range, Fragment.PolExclude(m, p)))
except IOError:
print(f' error: fragment input file {self.filename} not found')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
def GetFragmentPairs(self, ff):
'''generate fragment pairs based on fragment list; fragment pairs are not formed for ++ and -- combinations'''
try:
i = j = 0
for i in range(0, len(self.fragments)):
for j in range(i, len(self.fragments)):
if ((self.fragments[i].q * self.fragments[j].q <= 0.0) or max(abs(self.fragments[i].q), abs(self.fragments[j].q)) == 0) and (self.fragments[i].scale_eps and self.fragments[j].scale_eps) and (not self.fragments[i].pol_model or not self.fragments[j].pol_model):
d = next((x for x in ff.dimers if (x.m1.name == self.fragments[i].name and x.m2.name == self.fragments[j].name) or (x.m1.name == self.fragments[j].name and x.m2.name == self.fragments[i].name)), None)
if d is not None:
self.fragmentpairs.append(FragmentPair(self.fragments[i], self.fragments[j], d.r, d.k_sapt))
else:
raise Exception(f' error: dimer {self.fragments[i].name} {self.fragments[j].name} not found in {ff.filename}')
j += 1
i += 1
except Exception as e:
print(e)
sys.exit(1)
def ParseScaleSigma(self, scsig):
if len(scsig) > 0:
if _Const.isfloat(scsig[0]):
_Const.sigma_k = float(scsig[0])
scsig.pop(0)
if len(scsig) > 0:
for i in scsig:
fi = next((x for x in self.fragments if (x.name == i)), None)
if (fi is None):
raise Exception(f' error: fragment {i} specified with -s option not found in fragment.inp ')
elif fi.pol_model:
raise Exception(f' error: fragment {i} specified with -s option is already polarisable: sigma should not be scaled')
else:
fi.scale_sig = True
else:
for f in self.fragments:
f.scale_sig = True
def __str__(self):
res = self.filename
res += '\nFRAGMENTS'
for fr in self.fragments:
res += '\n' + str(fr)
res+='\nFRAGMENT PAIRS'
for frp in self.fragmentpairs:
res += '\n' + str(frp)
return res
def GetFragAtoms(self, pol):
'''get atom list for fragments based on existing atom type '''
try:
for fr in self.fragments:
if os.path.exists('./' + fr.name + '.zmat'):
fr.GetAtomsFromZmat(pol)
elif os.path.exists('./' + fr.name + '.xyz'):
fr.GetAtomsFromXYZ(pol)
elif os.path.exists('./' + fr.name + '.mol'):
fr.GetAtomsFromMol(pol)
elif os.path.exists('./' + fr.name + '.pdb'):
fr.GetAtomsFromPdb(pol)
else:
raise Exception(f' error: structure file (.zmat, .xyz, .pdb or .mol) for fragment {fr.name} not found')
except Exception as e:
print(e)
sys.exit(1)
def GetKPred(self):
for frp in self.fragmentpairs:
frp.PredictK()
class ScaleLJ(object):
'''class with static functions to scale sigma and epsilon in pair-p.lmp and print output file'''
@staticmethod
def Scale(pair_in_file, ff, syst, sapt, scsig):
try:
res= []
for line in open(pair_in_file, 'r'):
tok = line.strip().split()
if tok[0] != 'pair_coeff':
continue
if not (tok[3].startswith('lj') and tok[1].isdigit() and tok[2].isdigit()):
res.append(line.strip())
continue
i = int(tok[1])
j = int(tok[2])
pair = tok[3]
eps = float(tok[4])
sig = float(tok[5])
com = ''
if len(tok) >= 7:
for n in range(6, len(tok)):
com += ' ' + tok[n]
for frp in syst.fragmentpairs:
if not sapt:
k = frp.k_pred
elif frp.k_sapt is not None:
k = frp.k_sapt
else:
raise Exception(f' error: k_sapt for {frp.fr1.name} {frp.fr2.name} dimer not found in {ff.filename}')
if ((i in frp.fr1.ind_range and j in frp.fr2.ind_range) or (j in frp.fr1.ind_range and i in frp.fr2.ind_range)) and k < 1:
eps *= k
com += ' ~'
break
if (scsig is not None):
fi = next((x for x in syst.fragments if (i in x.ind_range)), None)
fj = next((x for x in syst.fragments if (j in x.ind_range)), None)
if (fi is not None and fj is not None):
if fi.scale_sig and fj.scale_sig:
sig *= _Const.sigma_k
com += ' *'
res.append(f'pair_coeff {i:4d} {j:4d} {pair:18s} {eps:10.6f} {sig:10.6f} {com:s}')
return res
except IOError:
print(f' error: pair style file {pair_in_file} not found')
sys.exit(1)
except Exception as e:
print(e)
sys.exit(1)
@staticmethod
def WriteResultToFile(pair_out_file, res):
with open(pair_out_file, 'w+') as f:
for line in res:
f.write(line+'\n')
def PrintReport(syst, sapt, scsig, polarisable):
'''print report to screen'''
report = 'Epsilon LJ coefficients were scaled by '
if sapt:
report += 'k_sapt'
else:
report += 'k_pred'
report += ' parameter'
if polarisable is not None:
tmp = ', '.join(polarisable)
report += f'. Fragments {tmp} were already polarisable '
report +=". Changes are marked with '~'.\n"
report += 'Sigma LJ coefficients '
if scsig is None:
report += 'were not scaled.\n'
else:
report += f'were scaled by {_Const.sigma_k:5.3f} value.'
if all([x.scale_sig for x in syst.fragments]):
report += ' All fragments were scaled.'
else:
sig_list = [f.name for f in syst.fragments if f.scale_sig]
tmp = ', '.join(sig_list)
report += f' Only {tmp} fragments were scaled.'
report +=" Changes are marked with '*'.\n"
report += '------------------------------------------\n'
report += 'Fragment_i Fragment_j k_sapt'
if not sapt:
report += ' k_pred'
for frp in syst.fragmentpairs:
report += f'\n{frp.fr1.name:10s} {frp.fr2.name:10s}'
if sapt:
report += f' {frp.k_sapt:6.2f}'
elif frp.k_sapt is None:
report += f' - {frp.k_pred:6.2f}'
else:
report += f' {frp.k_sapt:6.2f} {frp.k_pred:6.2f}'
report += '\n------------------------------------------'
print(report)
def main():
parser = argparse.ArgumentParser(description = usage, formatter_class = argparse.RawTextHelpFormatter)
parser.add_argument('-f', '--ff_file', type=str, default = 'fragment.ff', help = 'fragment force field (default: fragment.ff)')
parser.add_argument('-a', '--alpha_file', type=str, default = 'alpha.ff', help = 'polarisability values file (default: alpha.ff)')
parser.add_argument('-i', '--input_file', type=str, default = 'fragment.inp', help = 'fragment input file with atomic indices (default: fragment.inp)')
parser.add_argument('-ip', '--pair_in_file', type=str, default = 'pair.lmp', help = 'pair style input file (default: pair.lmp)')
parser.add_argument('-op', '--pair_out_file', type=str, default = 'pair-sc.lmp', help = 'pair style output file (default: pair-sc.lmp)')
parser.add_argument('-q', '--sapt', action = 'store_true', help = 'use sapt calculated k values, default: use predicted k values')
parser.add_argument('-s', '--scsig', nargs='*', type = str, help = 'scale sigma if specified; default value: 0.985; \n\
-s - scale all fragments\' sigma by 0.985 \n\
-s value - scale all fragments\' sigma by user-defined value \n\
-s name1 name2 ... - scale the specified fragments\' sigma by 0.985 \n\
-s value name1 name2 ... - scale the specified fragments\' sigma by user-defined value')
parser.add_argument('-p', '--polarisable', nargs='+', type = str, help = 'already polarisable monomers')
args = parser.parse_args()
ff = Forcefield(args.ff_file)
syst = System(args.input_file)
syst.GetFragments(ff,args.polarisable)
if args.scsig is not None:
syst.ParseScaleSigma(args.scsig)
syst.GetFragmentPairs(ff)
if (not args.sapt):
pol = Polarisation(args.alpha_file)
syst.GetFragAtoms(pol)
syst.GetKPred()
res = ScaleLJ.Scale(args.pair_in_file,ff,syst,args.sapt,args.scsig)
ScaleLJ.WriteResultToFile(args.pair_out_file, res)
print('scaled LJ parameters written to ', args.pair_out_file)
PrintReport(syst,args.sapt,args.scsig,args.polarisable)
if __name__ == '__main__':
main()