@ -28,7 +28,7 @@ parser.add_argument('-m','--method',type=str,default='XTB2',help='Metode yang di
parser . add_argument ( ' -sfreq ' , ' --scalefreq ' , type = float , default = 1 , help = ' Faktor skala frekuensi yang digunakan. ' )
# Input yang berkaitan dengan perhitungan menggunakan software DCDFTBMD
parser . add_argument ( ' -disp ' , ' --dispersion ' , type = str , default = ' None ' , help = ' Model koreksi dispersi jika menggunakan software DCDFTB. Pilihan: None, D3, D3BJ, D3H5. ' )
parser . add_argument ( ' -para ' , ' --parapath ' , type = str , default = ' /home /adit/opt/dftbplus/external/slakos/origin/3ob-3-1 ' , help = ' Lokasi folder berisikan himpunan parameter DFTB yang akan digunakan. ' )
parser . add_argument ( ' -para ' , ' --parapath ' , type = str , default = ' /Users /adit/opt/dftbplus/external/slakos/origin/3ob-3-1 ' , help = ' Lokasi folder berisikan himpunan parameter DFTB yang akan digunakan. ' )
parser . add_argument ( ' -iter ' , ' --iter ' , type = int , default = 9999 , help = ' Jumlah iterasi dalam optimasi geometri dan jenis perhitungan lainnya ' )
parser . add_argument ( ' -ens ' , ' --ensembel ' , type = str , default = ' NVE ' , help = ' Ensembel yang digunakan dalam simulasi dinamika molekul. Pilihan: NVE, NVT, dan NPT. ' )
parser . add_argument ( ' -tstat ' , ' --thermostat ' , type = str , default = ' andersen ' , help = ' Termostat yang digunakan dalam simulasi NVT. Pilihan: andersen,berendsen,dan nose ' )
@ -180,6 +180,7 @@ parser.add_argument('-cpress','--cellpress',type=float,default=0.0,help='Tekanan
parser . add_argument ( ' -press_conv ' , ' --press_conv_thr ' , type = float , default = 0.5 , help = ' Kriteria konvergensi untuk tekanan sel. Default=0.5 kbar. ' )
parser . add_argument ( ' -nband ' , ' --nband ' , type = int , default = 8 , help = ' Jumlah tingkat energi yang ingin diplot dalam DOS. ' )
parser . add_argument ( ' -occ ' , ' --occ ' , type = str , default = ' tetrahedra ' , help = ' Metode smearing yang digunakan. Default: tetrahedra. Pilihan: smearing, tetrahedra_lin, tetrahedra_opt, fixed, from_input. ' )
parser . add_argument ( " -slurm " , " --slurm " , type = str , default = " true " , help = " Apakah akan menggunakan slurm atau tidak. Default: true " )
opt = parser . parse_args ( sys . argv [ 1 : ] )
@ -187,6 +188,7 @@ opt=parser.parse_args(sys.argv[1:])
if ( ' .xyz ' or ' .pdb ' or ' POSCAR ' or ' .vasp ' or ' .poscar ' ) in opt . input :
geom = opt . input
elif ' .mol2 ' in opt . input :
if opt . slurm == " true " :
with open ( ' run_babel.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
@ -197,19 +199,36 @@ export OMP_NUM_THREADS={}
cd $ PWD
obabel { } - O geom . xyz """ .format(opt.nproc,opt.input),file=fout)
os . system ( ' sbatch run_babel.sh ' )
else :
with open ( ' run_babel.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
export OMP_NUM_THREADS = { }
cd $ PWD
obabel { } - O geom . xyz """ .format(opt.nproc,opt.input),file=fout)
os . system ( " chmod +x run_babel.sh " )
os . system ( ' ./run_babel.sh ' )
geom = ' geom.xyz '
elif ( ' .mol2 ' not in opt . input and ' .xyz ' not in opt . input and ' .pdb ' not in opt . input and ' .vasp ' not in opt . input and ' .poscar ' not in opt . input and ' POSCAR ' not in opt . input and ' .gen ' not in opt . input ) :
os . system ( " echo ' {} ' > geom.smi " . format ( opt . input ) )
if opt . slurm == " true " :
with open ( ' run_babel.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
obabel geom . smi - O geom . xyz - - gen3d """ .format(opt.nproc),file=fout)
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
obabel geom . smi - O geom . xyz - - gen3d """ .format(opt.nproc),file=fout)
os . system ( ' sbatch run_babel.sh ' )
else :
with open ( ' run_babel.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
export OMP_NUM_THREADS = { }
cd $ PWD
obabel geom . smi - O geom . xyz - - gen3d """ .format(opt.nproc),file=fout)
os . system ( " chmod +x run_babel.sh " )
os . system ( ' ./run_babel.sh ' )
while not os . path . exists ( ' geom.xyz ' ) :
time . sleep ( 3 )
geom = ' geom.xyz '
@ -236,6 +255,7 @@ if opt.software == 'dock':
addcharge ( opt . input , opt . chargetype )
if opt . job == ' sphgen ' :
sphgen ( opt . input )
if opt . slurm == ' true ' :
with open ( ' run_sphgen.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
@ -247,46 +267,81 @@ cd $PWD
$ DOCK_DIR / sphgen
$ DOCK_DIR / sphere_selector protein . sph { } { } """ .format(opt.nproc,opt.ligand,opt.dockrange),file=fout)
os . system ( " sbatch run_sphgen.sh " )
else :
with open ( ' run_sphgen.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / sphgen
$ DOCK_DIR / sphere_selector protein . sph { } { } """ .format(opt.nproc,opt.ligand,opt.dockrange),file=fout)
os . system ( " chmod +x run_sphgen.sh " )
os . system ( " ./run_sphgen.sh " )
if opt . job == ' showsphere ' :
showsphere ( )
if opt . job == ' gridgen ' :
gridgen ( opt . input )
if opt . slurm == " true " :
with open ( ' run_grid.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / grid - i grid . in """ .format(opt.nproc),file=fout)
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / grid - i grid . in """ .format(opt.nproc),file=fout)
os . system ( " sbatch run_grid.sh " )
else :
with open ( ' run_grid.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / grid - i grid . in """ .format(opt.nproc),file=fout)
os . system ( " chmod +x run_grid.sh " )
os . system ( " ./run_grid.sh " )
if opt . job == ' rigiddock ' :
rigiddock ( opt . ligand , opt . calcrmsd )
if opt . slurm == " true " :
with open ( ' run_rigiddock.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / dock6 - i rigid . in - o rigid . out """ .format(opt.nproc),file=fout)
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / dock6 - i rigid . in - o rigid . out """ .format(opt.nproc),file=fout)
os . system ( " sbatch run_rigiddock.sh " )
else :
with open ( ' run_rigiddock.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / dock6 - i rigid . in - o rigid . out """ .format(opt.nproc),file=fout)
os . system ( " chmod +x run_rigiddock.sh " )
os . system ( " ./run_rigiddock.sh " )
if opt . job == ' flexdock ' :
flexdock ( opt . ligand , opt . calcrmsd )
if opt . slurm == " true " :
with open ( ' run_flexdock.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / dock6 - i flex . in - o flex . out """ .format(opt.nproc),file=fout)
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / dock6 - i flex . in - o flex . out """ .format(opt.nproc),file=fout)
os . system ( " sbatch run_flexdock.sh " )
else :
with open ( ' run_flexdock.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
export OMP_NUM_THREADS = { }
cd $ PWD
$ DOCK_DIR / dock6 - i flex . in - o flex . out """ .format(opt.nproc),file=fout)
os . system ( " chmod +x run_flexdock.sh " )
os . system ( " ./run_flexdock.sh " )
if opt . job == ' translig ' :
translig ( opt . ligand )
@ -312,17 +367,27 @@ if opt.software == 'dftb':
geom = ' in.gen '
dftb ( geom , opt . job , opt . activeatoms , opt . method , opt . parapath , opt . dispersion , opt . kpts , opt . hcorr )
if opt . slurm == " true " :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
cp cmmd . in dftb_in . hsd
$ DFTB_COMMAND cmmd . in > cmmd . out """ .format(opt.nproc),file=fout)
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=168:0:0
export OMP_NUM_THREADS = { }
cd $ PWD
cp cmmd . in dftb_in . hsd
$ DFTB_COMMAND cmmd . in > cmmd . out """ .format(opt.nproc),file=fout)
os . system ( ' sbatch run.sh ' )
else :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
export OMP_NUM_THREADS = { }
cd $ PWD
cp cmmd . in dftb_in . hsd
$ DFTB_COMMAND cmmd . in > cmmd . out """ .format(opt.nproc),file=fout)
os . system ( " chmod +x run.sh " )
os . system ( ' ./run.sh ' )
if opt . software == ' qe ' :
@ -330,33 +395,47 @@ if opt.software == 'qe':
# RUNNING SCRIPT
if opt . software == ' orca ' :
if opt . slurm == " true " :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task={}
#SBATCH --time=168:0:0
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
export OMP_NUM_THREADS = 1
cd $ PWD
$ ORCA_COMMAND cmmd . in > cmmd . out - - oversubscribe """ .format(opt.nproc),file=fout)
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task={}
#SBATCH --time=168:0:0
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
export OMP_NUM_THREADS = 1
cd $ PWD
$ ORCA_COMMAND cmmd . in > cmmd . out - - oversubscribe """ .format(opt.nproc),file=fout)
os . system ( ' sbatch run.sh ' )
else :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
cd $ PWD
$ ORCA_COMMAND cmmd . in > cmmd . out - - oversubscribe """ ,file=fout)
os . system ( " chmod +x run.sh " )
os . system ( ' ./run.sh ' )
if opt . software == ' nwchem ' :
if opt . slurm == " true " :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task={}
#SBATCH --time=168:0:0
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
export OMP_NUM_THREADS = 1
cd $ PWD
$ NWCHEM_COMMAND cmmd . in > cmmd . out """ .format(opt.nproc),file=fout)
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task={}
#SBATCH --time=168:0:0
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
export OMP_NUM_THREADS = 1
cd $ PWD
$ NWCHEM_COMMAND cmmd . in > cmmd . out """ .format(opt.nproc),file=fout)
os . system ( ' sbatch run.sh ' )
else :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
cd $ PWD
$ NWCHEM_COMMAND cmmd . in > cmmd . out """ ,file=fout)
os . system ( " chmod +x run.sh " )
os . system ( ' ./run.sh ' )
if opt . software == ' qe ' :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
@ -403,4 +482,4 @@ if opt.job == 'ligprep' and opt.software == 'gmx':
# Program XTB Standalone
if opt . software == ' xtb ' :
xtb ( opt . job , geom , opt . nproc , opt . produk , opt . temp , opt . nrun , opt . npoint , opt . anopt , opt . kpush , opt . kpull , opt . ppull , opt . alp , opt . distance , opt . angle , opt . dihedral , opt . scanmode , opt . iter , opt . scan , opt . solvent , opt . charge , opt . mult , opt . method , opt . fixedatoms , opt . fixedelements )
xtb ( opt . job , geom , opt . nproc , opt . produk , opt . temp , opt . nrun , opt . npoint , opt . anopt , opt . kpush , opt . kpull , opt . ppull , opt . alp , opt . distance , opt . angle , opt . dihedral , opt . scanmode , opt . iter , opt . scan , opt . solvent , opt . charge , opt . mult , opt . method , opt . fixedatoms , opt . fixedelements , opt . slurm )