@ -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. ' )
parser . add_argument ( ' -sfreq ' , ' --scalefreq ' , type = float , default = 1 , help = ' Faktor skala frekuensi yang digunakan. ' )
# Input yang berkaitan dengan perhitungan menggunakan software DCDFTBMD
# 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 ( ' -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 ( ' -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 ( ' -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 ' )
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 ( ' -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 ( ' -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 ( ' -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 : ] )
opt = parser . parse_args ( sys . argv [ 1 : ] )
@ -187,8 +188,9 @@ opt=parser.parse_args(sys.argv[1:])
if ( ' .xyz ' or ' .pdb ' or ' POSCAR ' or ' .vasp ' or ' .poscar ' ) in opt . input :
if ( ' .xyz ' or ' .pdb ' or ' POSCAR ' or ' .vasp ' or ' .poscar ' ) in opt . input :
geom = opt . input
geom = opt . input
elif ' .mol2 ' in opt . input :
elif ' .mol2 ' in opt . input :
with open ( ' run_babel.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run_babel.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --cpus-per-task=1
@ -196,20 +198,37 @@ elif '.mol2' in opt.input:
export OMP_NUM_THREADS = { }
export OMP_NUM_THREADS = { }
cd $ PWD
cd $ PWD
obabel { } - O geom . xyz """ .format(opt.nproc,opt.input),file=fout)
obabel { } - O geom . xyz """ .format(opt.nproc,opt.input),file=fout)
os . system ( ' sbatch run_babel.sh ' )
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 '
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 ) :
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 ) )
os . system ( " echo ' {} ' > geom.smi " . format ( opt . input ) )
with open ( ' run_babel.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run_babel.sh ' , ' w ' ) as fout :
#SBATCH --nodes=1
print ( """ #!/bin/bash
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --time=168:0:0
#SBATCH --cpus-per-task=1
export OMP_NUM_THREADS = { }
#SBATCH --time=168:0:0
cd $ PWD
export OMP_NUM_THREADS = { }
obabel geom . smi - O geom . xyz - - gen3d """ .format(opt.nproc),file=fout)
cd $ PWD
os . system ( ' sbatch run_babel.sh ' )
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 ' ) :
while not os . path . exists ( ' geom.xyz ' ) :
time . sleep ( 3 )
time . sleep ( 3 )
geom = ' geom.xyz '
geom = ' geom.xyz '
@ -236,6 +255,7 @@ if opt.software == 'dock':
addcharge ( opt . input , opt . chargetype )
addcharge ( opt . input , opt . chargetype )
if opt . job == ' sphgen ' :
if opt . job == ' sphgen ' :
sphgen ( opt . input )
sphgen ( opt . input )
if opt . slurm == ' true ' :
with open ( ' run_sphgen.sh ' , ' w ' ) as fout :
with open ( ' run_sphgen.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
print ( """ #!/bin/bash
#SBATCH --nodes=1
#SBATCH --nodes=1
@ -247,46 +267,81 @@ cd $PWD
$ DOCK_DIR / sphgen
$ DOCK_DIR / sphgen
$ DOCK_DIR / sphere_selector protein . sph { } { } """ .format(opt.nproc,opt.ligand,opt.dockrange),file=fout)
$ DOCK_DIR / sphere_selector protein . sph { } { } """ .format(opt.nproc,opt.ligand,opt.dockrange),file=fout)
os . system ( " sbatch run_sphgen.sh " )
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 ' :
if opt . job == ' showsphere ' :
showsphere ( )
showsphere ( )
if opt . job == ' gridgen ' :
if opt . job == ' gridgen ' :
gridgen ( opt . input )
gridgen ( opt . input )
with open ( ' run_grid.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run_grid.sh ' , ' w ' ) as fout :
#SBATCH --nodes=1
print ( """ #!/bin/bash
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --time=168:0:0
#SBATCH --cpus-per-task=1
export OMP_NUM_THREADS = { }
#SBATCH --time=168:0:0
cd $ PWD
export OMP_NUM_THREADS = { }
$ DOCK_DIR / grid - i grid . in """ .format(opt.nproc),file=fout)
cd $ PWD
os . system ( " sbatch run_grid.sh " )
$ 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 ' :
if opt . job == ' rigiddock ' :
rigiddock ( opt . ligand , opt . calcrmsd )
rigiddock ( opt . ligand , opt . calcrmsd )
with open ( ' run_rigiddock.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run_rigiddock.sh ' , ' w ' ) as fout :
#SBATCH --nodes=1
print ( """ #!/bin/bash
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --time=168:0:0
#SBATCH --cpus-per-task=1
export OMP_NUM_THREADS = { }
#SBATCH --time=168:0:0
cd $ PWD
export OMP_NUM_THREADS = { }
$ DOCK_DIR / dock6 - i rigid . in - o rigid . out """ .format(opt.nproc),file=fout)
cd $ PWD
os . system ( " sbatch run_rigiddock.sh " )
$ 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 ' :
if opt . job == ' flexdock ' :
flexdock ( opt . ligand , opt . calcrmsd )
flexdock ( opt . ligand , opt . calcrmsd )
with open ( ' run_flexdock.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run_flexdock.sh ' , ' w ' ) as fout :
#SBATCH --nodes=1
print ( """ #!/bin/bash
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --time=168:0:0
#SBATCH --cpus-per-task=1
export OMP_NUM_THREADS = { }
#SBATCH --time=168:0:0
cd $ PWD
export OMP_NUM_THREADS = { }
$ DOCK_DIR / dock6 - i flex . in - o flex . out """ .format(opt.nproc),file=fout)
cd $ PWD
os . system ( " sbatch run_flexdock.sh " )
$ 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 ' :
if opt . job == ' translig ' :
translig ( opt . ligand )
translig ( opt . ligand )
@ -312,17 +367,27 @@ if opt.software == 'dftb':
geom = ' in.gen '
geom = ' in.gen '
dftb ( geom , opt . job , opt . activeatoms , opt . method , opt . parapath , opt . dispersion , opt . kpts , opt . hcorr )
dftb ( geom , opt . job , opt . activeatoms , opt . method , opt . parapath , opt . dispersion , opt . kpts , opt . hcorr )
with open ( ' run.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run.sh ' , ' w ' ) as fout :
#SBATCH --nodes=1
print ( """ #!/bin/bash
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --time=168:0:0
#SBATCH --cpus-per-task=1
export OMP_NUM_THREADS = { }
#SBATCH --time=168:0:0
cd $ PWD
export OMP_NUM_THREADS = { }
cp cmmd . in dftb_in . hsd
cd $ PWD
$ DFTB_COMMAND cmmd . in > cmmd . out """ .format(opt.nproc),file=fout)
cp cmmd . in dftb_in . hsd
os . system ( ' sbatch run.sh ' )
$ 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 ' :
if opt . software == ' qe ' :
@ -330,33 +395,47 @@ if opt.software == 'qe':
# RUNNING SCRIPT
# RUNNING SCRIPT
if opt . software == ' orca ' :
if opt . software == ' orca ' :
with open ( ' run.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run.sh ' , ' w ' ) as fout :
#SBATCH --nodes=1
print ( """ #!/bin/bash
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task={}
#SBATCH --ntasks=1
#SBATCH --time=168:0:0
#SBATCH --cpus-per-task={}
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
#SBATCH --time=168:0:0
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
export OMP_NUM_THREADS = 1
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
cd $ PWD
export OMP_NUM_THREADS = 1
$ ORCA_COMMAND cmmd . in > cmmd . out - - oversubscribe """ .format(opt.nproc),file=fout)
cd $ PWD
os . system ( ' sbatch run.sh ' )
$ 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 . software == ' nwchem ' :
with open ( ' run.sh ' , ' w ' ) as fout :
if opt . slurm == " true " :
print ( """ #!/bin/bash
with open ( ' run.sh ' , ' w ' ) as fout :
#SBATCH --nodes=1
print ( """ #!/bin/bash
#SBATCH --ntasks=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task={}
#SBATCH --ntasks=1
#SBATCH --time=168:0:0
#SBATCH --cpus-per-task={}
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
#SBATCH --time=168:0:0
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
export LD_LIBRARY_PATH = / home / adit / opt / openmpi411 / lib : $ LD_LIBRARY_PATH
export OMP_NUM_THREADS = 1
export PATH = / home / adit / opt / openmpi411 / bin : $ PATH
cd $ PWD
export OMP_NUM_THREADS = 1
$ NWCHEM_COMMAND cmmd . in > cmmd . out """ .format(opt.nproc),file=fout)
cd $ PWD
os . system ( ' sbatch run.sh ' )
$ 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 ' :
if opt . software == ' qe ' :
with open ( ' run.sh ' , ' w ' ) as fout :
with open ( ' run.sh ' , ' w ' ) as fout :
print ( """ #!/bin/bash
print ( """ #!/bin/bash
@ -403,4 +482,4 @@ if opt.job == 'ligprep' and opt.software == 'gmx':
# Program XTB Standalone
# Program XTB Standalone
if opt . software == ' xtb ' :
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 )