├── __init__.py ├── tests ├── __init__.py ├── TestReference │ ├── pyconsolv.restart │ ├── simulation │ │ ├── solvent │ │ ├── eq.rst7 │ │ ├── dry_sim.in │ │ ├── run-simulation.sh │ │ ├── align.in │ │ ├── align_dry.in │ │ ├── orca_sp.inp │ │ ├── simulation.in │ │ └── mdinfo │ ├── MCPB_setup │ │ ├── LIG_small.res │ │ ├── LIG_small_fc.log │ │ ├── Connections │ │ ├── Connections_old │ │ ├── chargeMap.dat │ │ ├── filenames.restart │ │ ├── metalConnections │ │ ├── D.pdb │ │ ├── E.pdb │ │ ├── PT.pdb │ │ ├── B.frcmod │ │ ├── C.frcmod │ │ ├── LIG_large.fingerprint │ │ ├── LIG_small_fc.com │ │ ├── LIG_small_fc.inp │ │ ├── D.frcmod │ │ ├── E.frcmod │ │ ├── D.mol2 │ │ ├── E.mol2 │ │ ├── PT.mol2 │ │ ├── input.in │ │ ├── D1.mol2 │ │ ├── E1.mol2 │ │ ├── PT1.mol2 │ │ ├── B.pdb │ │ ├── C.pdb │ │ ├── sqm.pdb │ │ ├── sqm.in │ │ ├── LIG_standard.fingerprint │ │ ├── LIG_dry.inpcrd │ │ ├── B1.mol2 │ │ ├── C1.mol2 │ │ ├── LIG_small_opt.com │ │ ├── B.mol2 │ │ ├── C.mol2 │ │ ├── LIG_large_mk.com │ │ ├── LIG_small_opt.inp │ │ ├── LIG_large.pdb │ │ ├── LIG_small.pdb │ │ ├── LIG_standard.pdb │ │ ├── LIG_large_mk.inp │ │ ├── input.xyz │ │ ├── LIG_dry.pdb │ │ ├── antechamber_B.out │ │ ├── antechamber_C.out │ │ ├── LIG_mcpbpy.pdb │ │ ├── Full_PDB.pdb │ │ ├── LIG_tleap.in │ │ ├── LIG_mcpbpy_pre.frcmod │ │ ├── LIG_mcpbpy.frcmod │ │ ├── MCPB_s4.out │ │ ├── sqm.out │ │ ├── tleap.log │ │ └── MCPB_s1.out │ ├── orca_calculations │ │ ├── freq │ │ │ ├── fakelog.log │ │ │ ├── run_calc.sh │ │ │ ├── multiwfn.input │ │ │ ├── orca_freq.gbw │ │ │ ├── orca_freq.densities │ │ │ ├── orca_freq_atom78.densities │ │ │ ├── orca_freq.inp │ │ │ ├── orca_freq.molden.chg │ │ │ ├── input.xyz │ │ │ └── orca_freq_atom78_property.txt │ │ └── opt │ │ │ ├── run_calc.sh │ │ │ ├── orca_opt.gbw │ │ │ ├── orca_opt.densities │ │ │ ├── orca_opt_atom78.densities │ │ │ ├── orca_opt.inp │ │ │ ├── input.xyz │ │ │ ├── orca_opt.xyz │ │ │ ├── orca_opt.engrad │ │ │ ├── orca_opt_atom78_property.txt │ │ │ └── orca_opt_trj.xyz │ ├── equilibration │ │ ├── 01.rst7 │ │ ├── 02.rst7 │ │ ├── 03.rst7 │ │ ├── 04.rst7 │ │ ├── 05.rst7 │ │ ├── 06.rst7 │ │ ├── 07.rst7 │ │ ├── 08.rst7 │ │ ├── 09.rst7 │ │ ├── 10.rst7 │ │ ├── 11.rst7 │ │ ├── 12.rst7 │ │ ├── 13.rst7 │ │ ├── 14.rst7 │ │ ├── 15.rst7 │ │ ├── 16.rst7 │ │ ├── 17.rst7 │ │ ├── 18.rst7 │ │ ├── 19.rst7 │ │ ├── 20.rst7 │ │ ├── 21.rst7 │ │ ├── 01.in │ │ ├── 14.in │ │ ├── 15.in │ │ ├── 16.in │ │ ├── 17.in │ │ ├── 18.in │ │ ├── 19.in │ │ ├── 02.in │ │ ├── 07.in │ │ ├── 08.in │ │ ├── 09.in │ │ ├── 10.in │ │ ├── 11.in │ │ ├── 12.in │ │ ├── 13.in │ │ ├── 21.in │ │ ├── 20.in │ │ ├── 04.in │ │ ├── 05.in │ │ ├── 03.in │ │ ├── 06.in │ │ └── mdinfo │ ├── input.xyz │ └── input.xyz.original ├── Testfiles │ └── input.xyz ├── test_amber.py └── test_filestructure.py ├── src └── PyConSolv │ ├── __init__.py │ ├── misc │ ├── __init__.py │ ├── solvenGen.py │ ├── counterionGen.py │ ├── counterion.py │ ├── files.py │ ├── pathchecker.py │ ├── solvent.py │ ├── restart.py │ ├── coordinateCheck.py │ ├── mol2.py │ ├── converter.py │ ├── ions.py │ ├── frcmod.py │ ├── clustering.py │ └── ui.py │ ├── utils │ ├── __init__.py │ ├── copier.py │ ├── colorgen.py │ └── charge.py │ ├── interfaces │ ├── __init__.py │ ├── cpptraj.py │ ├── mdengines.py │ ├── parmed.py │ ├── multiWFN.py │ └── calculate.py │ ├── scripts_and_inputs │ ├── dry_sim.in │ ├── align.in │ ├── align_dry.in │ ├── run_simulation.sh │ ├── run_simulation_gro.sh │ ├── simulation.in │ ├── simulation_cart.in │ ├── cluster_kmeans.in │ ├── simulation_restraint.in │ ├── strip.sh │ └── simulation_gro.mdp │ ├── solvents │ ├── ACN.frcmod │ ├── CHX.frcmod │ ├── CL3.frcmod │ ├── CL4.frcmod │ ├── DCM.frcmod │ ├── DMS.frcmod │ ├── ETL.frcmod │ ├── HEX.frcmod │ ├── MTL.frcmod │ ├── NH3.frcmod │ ├── OCT.frcmod │ ├── THF.frcmod │ ├── ACT.frcmod │ ├── BNZ.frcmod │ ├── TOL.frcmod │ ├── DMF.frcmod │ ├── PYR.frcmod │ ├── NH3.mol2 │ ├── CL3.mol2 │ ├── CL4.mol2 │ ├── DCM.mol2 │ ├── ACN.mol2 │ ├── MTL.mol2 │ ├── ETL.mol2 │ ├── ACT.mol2 │ ├── DMS.mol2 │ ├── PYR.mol2 │ ├── DMF.mol2 │ ├── BNZ.mol2 │ ├── THF.mol2 │ ├── TOL.mol2 │ ├── CHX.mol2 │ ├── HEX.mol2 │ └── OCT.mol2 │ ├── counterions │ ├── OTF.frcmod │ ├── CLO.frcmod │ ├── BF4.frcmod │ ├── PF6.frcmod │ ├── BF4.mol2 │ ├── CLO.mol2 │ ├── SCF.mol2 │ ├── PF6.mol2 │ ├── OTF.mol2 │ ├── SCF.frcmod │ ├── BPH.frcmod │ ├── BARF.frcmod │ └── BPH.mol2 │ ├── db │ └── atom-radius.txt │ └── pyconsolv.py ├── .gitignore ├── Manual ├── Manual_v1.0.6.3.docx └── Manual_v1.0.6.3.pdf ├── requirements.txt ├── conda └── meta.yaml ├── pyproject.toml ├── setup.py └── README.md /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/PyConSolv/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/PyConSolv/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /tests/__pycache__* 2 | -------------------------------------------------------------------------------- /src/PyConSolv/interfaces/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestReference/pyconsolv.restart: -------------------------------------------------------------------------------- 1 | DONE -------------------------------------------------------------------------------- /tests/TestReference/simulation/solvent: -------------------------------------------------------------------------------- 1 | Water -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_small.res: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_small_fc.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/fakelog.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/Connections: -------------------------------------------------------------------------------- 1 | 0 2 | 1 2 3 4 3 | 5 6 7 8 4 | 9 5 | 10 6 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/Connections_old: -------------------------------------------------------------------------------- 1 | 0 2 | 1 2 3 4 3 | 5 6 7 8 4 | 9 5 | 10 6 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/chargeMap.dat: -------------------------------------------------------------------------------- 1 | PT 2.0 2 | B 0.0 3 | C 0.0 4 | D -1.0 5 | E -1.0 6 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/filenames.restart: -------------------------------------------------------------------------------- 1 | PT.pdb 2 | B.pdb 3 | C.pdb 4 | D.pdb 5 | E.pdb 6 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/metalConnections: -------------------------------------------------------------------------------- 1 | 0 @N1 1 2 | 0 @N5 5 3 | 0 @Cl9 9 4 | 0 @Cl10 10 5 | -------------------------------------------------------------------------------- /Manual/Manual_v1.0.6.3.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/Manual/Manual_v1.0.6.3.docx -------------------------------------------------------------------------------- /Manual/Manual_v1.0.6.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/Manual/Manual_v1.0.6.3.pdf -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy >= 1.23.1 2 | pandas >= 1.4.3 3 | matplotlib >= 3.5.3 4 | rdkit >= 2022.09.1 5 | parmed >= 4.2.0 -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/D.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 CL8 D 4 4 -2.495 -1.736 1.546 1.00 0.00 Cl 2 | TER -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/E.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 CL9 E 5 5 -5.129 -0.399 -0.247 1.00 0.00 Cl 2 | TER -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/PT.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 PT PT 1 1 -2.88 0.137 0.18 1.00 0.00 PT 2 | TER -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/run_calc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | /usr/local/bin/orca_5.0.4/orca orca_opt.inp > orca_opt.out -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/run_calc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | /usr/local/bin/orca_5.0.4/orca orca_freq.inp > orca_freq.out -------------------------------------------------------------------------------- /tests/TestReference/simulation/eq.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/simulation/eq.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/01.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/01.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/02.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/02.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/03.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/03.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/04.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/04.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/05.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/05.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/06.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/06.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/07.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/07.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/08.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/08.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/09.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/09.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/10.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/10.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/11.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/11.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/12.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/12.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/13.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/13.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/14.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/14.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/15.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/15.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/16.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/16.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/17.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/17.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/18.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/18.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/19.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/19.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/20.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/20.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/21.rst7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/equilibration/21.rst7 -------------------------------------------------------------------------------- /tests/TestReference/simulation/dry_sim.in: -------------------------------------------------------------------------------- 1 | parm LIG_solv.prmtop 2 | trajin sim-01.nc 3 | strip :WAT 4 | autoimage 5 | trajout dry.nc 6 | run 7 | quit -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/dry_sim.in: -------------------------------------------------------------------------------- 1 | parm LIG_solv.prmtop 2 | trajin sim-01.nc 3 | strip :SLV 4 | autoimage 5 | trajout dry.nc 6 | run 7 | quit -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/multiwfn.input: -------------------------------------------------------------------------------- 1 | ./orca_freq.molden.input 2 | 7 3 | 18 4 | 1 5 | 6 | 7 | 8 | 9 | y 10 | 0 11 | 0 12 | q 13 | -------------------------------------------------------------------------------- /tests/TestReference/simulation/run-simulation.sh: -------------------------------------------------------------------------------- 1 | pmemd.cuda -O -i simulation.in -o sim-01.out -p LIG_solv.prmtop -c eq.rst7 -x sim-01.nc -r sim-01.rst7 -ref eq.rst7 -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/align.in: -------------------------------------------------------------------------------- 1 | parm LIG_solv.prmtop 2 | trajin sim-01.nc 3 | autoimage 4 | align @replaceme first 5 | trajout solv_aligned.nc 6 | run 7 | quit -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/align_dry.in: -------------------------------------------------------------------------------- 1 | parm LIG_dry.prmtop 2 | trajin dry.nc 3 | autoimage 4 | align @replaceme first 5 | trajout dry_aligned.nc 6 | run 7 | quit -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/run_simulation.sh: -------------------------------------------------------------------------------- 1 | pmemd.cuda -O -i simulation.in -o sim-01.out -p LIG_solv.prmtop -c eq.rst7 -x sim-01.nc -r sim-01.rst7 -ref eq.rst7 -------------------------------------------------------------------------------- /tests/TestReference/equilibration/01.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=1000.0,restraintmask="!@H=" 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/14.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=5.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/15.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=4.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/16.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=3.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/17.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=2.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/18.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=1.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/19.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=0.5,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt.gbw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/orca_calculations/opt/orca_opt.gbw -------------------------------------------------------------------------------- /tests/TestReference/simulation/align.in: -------------------------------------------------------------------------------- 1 | parm LIG_solv.prmtop 2 | trajin sim-01.nc 3 | autoimage 4 | align @replaceme first 5 | trajout solv_aligned.nc 6 | run 7 | quit -------------------------------------------------------------------------------- /tests/TestReference/simulation/align_dry.in: -------------------------------------------------------------------------------- 1 | parm LIG_dry.prmtop 2 | trajin dry.nc 3 | autoimage 4 | align @replaceme first 5 | trajout dry_aligned.nc 6 | run 7 | quit -------------------------------------------------------------------------------- /tests/TestReference/equilibration/02.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=1000.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/07.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=1000.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/08.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=500.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/09.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=200.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/10.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=100.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/11.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=50.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/12.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=20.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/13.in: -------------------------------------------------------------------------------- 1 | minimization 2 | &cntrl 3 | imin=1,ncyc=500,maxcyc=1000,ntr=1,cut=8.0, 4 | restraint_wt=10.0,restraintmask="!@H=&:1", 5 | / 6 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/orca_freq.gbw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/orca_calculations/freq/orca_freq.gbw -------------------------------------------------------------------------------- /src/PyConSolv/solvents/ACN.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/CHX.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/CL3.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/CL4.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/DCM.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/DMS.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/ETL.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/HEX.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/MTL.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/NH3.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/OCT.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/THF.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt.densities: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/orca_calculations/opt/orca_opt.densities -------------------------------------------------------------------------------- /src/PyConSolv/counterions/OTF.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/run_simulation_gro.sh: -------------------------------------------------------------------------------- 1 | gmx_mpi grompp -f simulation_gro.mdp -c npt.gro -t npt.cpt -p LIG_solv.top -o md_0_1.tpr 2 | gmx mdrun -deffnm md_0_1 -nb gpu -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/B.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/C.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | 12 | NONBON 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/orca_freq.densities: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/orca_calculations/freq/orca_freq.densities -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_large.fingerprint: -------------------------------------------------------------------------------- 1 | 1-PT-PT 2 | 2-B-N1 3 | 2-B-H2 4 | 2-B-H3 5 | 2-B-H4 6 | 3-C-N5 7 | 3-C-H6 8 | 3-C-H7 9 | 3-C-H8 10 | 4-D-CL8 11 | 5-E-CL9 12 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt_atom78.densities: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/orca_calculations/opt/orca_opt_atom78.densities -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/orca_freq_atom78.densities: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PodewitzLab/PyConSolv/HEAD/tests/TestReference/orca_calculations/freq/orca_freq_atom78.densities -------------------------------------------------------------------------------- /tests/TestReference/simulation/orca_sp.inp: -------------------------------------------------------------------------------- 1 | ! BP86 def2-SVP D4 2 | ! SP 3 | ! CPCM(Water) 4 | 5 | %PAL NPROCS 8 END 6 | 7 | %scf 8 | maxiter 350 9 | end 10 | 11 | * xyzfile 0 1 input.xyz 12 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_small_fc.com: -------------------------------------------------------------------------------- 1 | %Chk=LIG_small_opt.chk 2 | %Mem=3000MB 3 | %NProcShared=2 4 | # B3LYP/6-31G* Freq Geom=AllCheckpoint Guess=Read 5 | Integral=(Grid=UltraFine) IOp(7/33=1) 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/21.in: -------------------------------------------------------------------------------- 1 | pressure equilibration 2 | &cntrl 3 | ntb=2,ntp=1,pres0=1.0,tautp=2.0, 4 | ntc=2,ntf=2,ntt=3,gamma_ln=2.0, 5 | tempi=300.0,temp0=300.0, 6 | nstlim=50000,dt=0.001, 7 | / 8 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt.inp: -------------------------------------------------------------------------------- 1 | ! BP86 def2-SVP D4 2 | ! OPT 3 | ! CPCM(Water) 4 | 5 | %PAL NPROCS 8 END 6 | 7 | %scf 8 | maxiter 350 9 | end 10 | 11 | * xyzfile 0 1 input.xyz 12 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/orca_freq.inp: -------------------------------------------------------------------------------- 1 | ! BP86 def2-SVP D4 2 | ! FREQ 3 | ! CPCM(Water) 4 | 5 | %PAL NPROCS 8 END 6 | 7 | %scf 8 | maxiter 350 9 | end 10 | 11 | * xyzfile 0 1 input.xyz 12 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/CLO.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | o -cl-o 162.6 109.44 from DFT scan 8 | 9 | DIHE 10 | 11 | IMPROPER 12 | 13 | NONBON 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_small_fc.inp: -------------------------------------------------------------------------------- 1 | $SYSTEM MEMDDI=400 MWORDS=200 $END 2 | $CONTRL DFTTYP=B3LYP RUNTYP=HESSIAN ICHARG=0 MULT=1 $END 3 | $BASIS GBASIS=N31 NGAUSS=6 NDFUNC=1 $END 4 | $DATA 5 | Cluster/6-31G 6 | C1 7 | 8 | $END 9 | -------------------------------------------------------------------------------- /src/PyConSolv/utils/copier.py: -------------------------------------------------------------------------------- 1 | import shutil 2 | class Copier: 3 | def __init__(self, source, destiny): 4 | self.source = source 5 | self.destiny = destiny 6 | 7 | def copy(self): 8 | shutil.copyfile(self.source,self.destiny) -------------------------------------------------------------------------------- /tests/TestReference/equilibration/20.in: -------------------------------------------------------------------------------- 1 | equilibration 2 | &cntrl 3 | ntb=1,ntc=2,ntf=2,ntt=3,gamma_ln=2.0,cut=8.0, 4 | nstlim=200000,dt=0.001,nmropt=1, 5 | / 6 | &wt TYPE='TEMP0', istep1=0, istep2=200000, value1=100.0,value2=300.0 / 7 | &wt TYPE='END' / 8 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/ACT.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | c3-c3-c -o 1.1 180.0 2.0 Using the default value 12 | 13 | NONBON 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/solvenGen.py: -------------------------------------------------------------------------------- 1 | from .parametrizerInterface import Parametrizer 2 | 3 | 4 | class solventParametrizer(Parametrizer): 5 | def __init__(self, structurePath: str): 6 | stype = 'SLV' 7 | Parametrizer.__init__(self, structurePath, stype) -------------------------------------------------------------------------------- /tests/TestReference/equilibration/04.in: -------------------------------------------------------------------------------- 1 | pressure equilibration 2 | &cntrl 3 | ntb=2,ntp=1,pres0=1.0,tautp=2.0, 4 | ntc=2,ntf=2,ntt=3,gamma_ln=2.0, 5 | tempi=300.0,temp0=300.0, 6 | ntr=1,restraint_wt=1000.0,restraintmask="!@H=&:1", 7 | nstlim=30000,dt=0.001, 8 | / 9 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/05.in: -------------------------------------------------------------------------------- 1 | pressure equilibration 2 | &cntrl 3 | ntb=2,ntp=1,pres0=1.0,tautp=2.0, 4 | ntc=2,ntf=2,ntt=3,gamma_ln=2.0, 5 | tempi=300.0,temp0=300.0, 6 | ntr=1,restraint_wt=1000.0,restraintmask="!@H=&:1", 7 | nstlim=70000,dt=0.001, 8 | / 9 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/D.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | Cl 35.450 1.910 same as cl 4 | 5 | BOND 6 | 7 | ANGLE 8 | 9 | DIHE 10 | 11 | IMPROPER 12 | 13 | NONBON 14 | Cl 1.9480 0.2650 same as cl 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/E.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | Cl 35.450 1.910 same as cl 4 | 5 | BOND 6 | 7 | ANGLE 8 | 9 | DIHE 10 | 11 | IMPROPER 12 | 13 | NONBON 14 | Cl 1.9480 0.2650 same as cl 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/counterionGen.py: -------------------------------------------------------------------------------- 1 | from .parametrizerInterface import Parametrizer 2 | 3 | 4 | class counterionParametrizer(Parametrizer): 5 | def __init__(self, structurePath: str): 6 | stype = 'CTI' 7 | Parametrizer.__init__(self, structurePath, stype) 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/D.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | D 3 | 1 0 1 0 0 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 CL8 -2.4950 -1.7360 1.5460 Cl 1 D -1.0000 10 | @BOND 11 | @SUBSTRUCTURE 12 | 1 D 1 TEMP 0 **** **** 0 ROOT 13 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/E.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | E 3 | 1 0 1 0 0 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 CL9 -5.1290 -0.3990 -0.2470 Cl 1 E -1.0000 10 | @BOND 11 | @SUBSTRUCTURE 12 | 1 E 1 TEMP 0 **** **** 0 ROOT 13 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/PT.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | PT 3 | 1 0 1 0 0 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 PT -2.8800 0.1370 0.1800 PT 1 PT 2.0000 10 | @BOND 11 | @SUBSTRUCTURE 12 | 1 PT 1 TEMP 0 **** **** 0 ROOT 13 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/BNZ.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | ca-ca-ca-ha 1.1 180.0 2.0 Using general improper torsional angle X- X-ca-ha, penalty score= 6.0) 12 | 13 | NONBON 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/TOL.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | ca-ca-ca-ha 1.1 180.0 2.0 Using general improper torsional angle X- X-ca-ha, penalty score= 6.0) 12 | 13 | NONBON 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/03.in: -------------------------------------------------------------------------------- 1 | equilibration 2 | &cntrl 3 | ntb=1,ntc=2,ntf=2,ntt=3,gamma_ln=2.0,cut=8.0, 4 | ntr=1,restraint_wt=1000.0,restraintmask="!@H=&:1", 5 | nstlim=100000,nmropt=1,dt=0.001, 6 | / 7 | &wt TYPE='TEMP0', istep1=0, istep2=100000, value1=100.0,value2=300.0 / 8 | &wt TYPE='END' / 9 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/06.in: -------------------------------------------------------------------------------- 1 | equilibration 2 | &cntrl 3 | ntb=1,ntc=2,ntf=2,ntt=3,gamma_ln=2.0,cut=8.0, 4 | ntr=1,restraint_wt=1000.0,restraintmask="!@H=&:1", 5 | nstlim=100000,dt=0.001,nmropt=1, 6 | / 7 | &wt TYPE='TEMP0', istep1=0, istep2=100000, value1=300.0,value2=100.0 / 8 | &wt TYPE='END' / 9 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/input.in: -------------------------------------------------------------------------------- 1 | original_pdb Full_PDB.pdb 2 | group_name LIG 3 | cut_off 2.8 4 | ion_ids 1 5 | software_version g16 6 | ion_mol2files PT.mol2 7 | naa_mol2files B.mol2 C.mol2 D.mol2 E.mol2 8 | frcmod_files B.frcmod C.frcmod D.frcmod E.frcmod 9 | add_bonded_pairs 1-10 10 | add_bonded_pairs 1-11 11 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/D1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | D1 3 | 1 0 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 CL8 -2.4950 -1.7360 1.5460 Y5 1 D1 -0.432203 10 | @BOND 11 | @SUBSTRUCTURE 12 | 1 D1 1 TEMP 0 **** **** 0 ROOT 13 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/E1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | E1 3 | 1 0 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 CL9 -5.1290 -0.3990 -0.2470 Y6 1 E1 -0.432090 10 | @BOND 11 | @SUBSTRUCTURE 12 | 1 E1 1 TEMP 0 **** **** 0 ROOT 13 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/PT1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | PT1 3 | 1 0 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 PT -2.8800 0.1370 0.1800 M1 1 PT1 -0.049711 10 | @BOND 11 | @SUBSTRUCTURE 12 | 1 PT1 1 TEMP 0 **** **** 0 ROOT 13 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/B.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 N1 B 2 2 -0.903 0.643 0.527 1.00 0.00 N 2 | HETATM 2 H2 B 2 2 -0.793 1.559 0.991 1.00 0.00 H 3 | HETATM 3 H3 B 2 2 -0.336 0.67 -0.335 1.00 0.00 H 4 | HETATM 4 H4 B 2 2 -0.479 -0.067 1.149 1.00 0.00 H 5 | END -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/C.pdb: -------------------------------------------------------------------------------- 1 | HETATM 5 N5 C 3 3 -3.179 1.8 -1.017 1.00 0.00 N 2 | HETATM 6 H6 C 3 3 -3.03 2.69 -0.515 1.00 0.00 H 3 | HETATM 7 H7 C 3 3 -4.156 1.8 -1.356 1.00 0.00 H 4 | HETATM 8 H8 C 3 3 -2.567 1.815 -1.848 1.00 0.00 H 5 | END -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/sqm.pdb: -------------------------------------------------------------------------------- 1 | ATOM 1 N5 C 3 -3.185 1.826 -1.036 1.00 0.00 N 2 | ATOM 2 H6 C 3 -3.034 2.669 -0.524 1.00 0.00 H 3 | ATOM 3 H7 C 3 -4.133 1.798 -1.347 1.00 0.00 H 4 | ATOM 4 H8 C 3 -2.580 1.812 -1.829 1.00 0.00 H 5 | -------------------------------------------------------------------------------- /src/PyConSolv/utils/colorgen.py: -------------------------------------------------------------------------------- 1 | class Color: 2 | PURPLE = '\033[1;35;48m' 3 | CYAN = '\033[1;36;48m' 4 | BOLD = '\033[1;37;48m' 5 | BLUE = '\033[1;34;48m' 6 | GREEN = '\033[1;32;48m' 7 | YELLOW = '\033[1;33;48m' 8 | RED = '\033[1;31;48m' 9 | BLACK = '\033[1;30;48m' 10 | UNDERLINE = '\033[4;37;48m' 11 | END = '\033[1;37;0m' 12 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/BF4.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | B 10.810 0.360 same as c2 4 | 5 | BOND 6 | B -f 370.60 1.339 same as c2- f, penalty score= 0.0 7 | 8 | ANGLE 9 | f -B -f 145.200 109.48 10 | 11 | DIHE 12 | 13 | IMPROPER 14 | 15 | NONBON 16 | B 1.9080 0.0860 same as c2 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/DMF.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | h5-n -c -o 10.5 180.0 2.0 Using general improper torsional angle X- X- c- o, penalty score= 6.0) 12 | c -c3-n -c3 1.1 180.0 2.0 Using the default value 13 | 14 | NONBON 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/PYR.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | 4 | BOND 5 | 6 | ANGLE 7 | 8 | DIHE 9 | 10 | IMPROPER 11 | ca-h4-ca-nb 1.1 180.0 2.0 Using the default value 12 | ca-ca-ca-ha 1.1 180.0 2.0 Using general improper torsional angle X- X-ca-ha, penalty score= 6.0) 13 | 14 | NONBON 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/PyConSolv/interfaces/cpptraj.py: -------------------------------------------------------------------------------- 1 | from ..misc.pathchecker import PATH 2 | import subprocess 3 | 4 | class CPPtraj: 5 | def __init__(self): 6 | self.program = 'cpptraj' 7 | # self.status = PATH(self.program) 8 | 9 | def run(self, basename): 10 | command = 'cpptraj {}.in > {}.log'.format(basename,basename) 11 | calc = subprocess.run(command, shell=True) -------------------------------------------------------------------------------- /tests/TestReference/simulation/simulation.in: -------------------------------------------------------------------------------- 1 | 100ns cmd simulation input 300K 2 | &cntrl 3 | ntb=2 4 | ntp=1, pres0=1.0, taup=2.0 5 | iwrap=1 6 | ioutfm=1 7 | ntxo=2 8 | ntx=5, irest=1 9 | cut=10.0 10 | ntc=2, ntf=2 11 | ntt=3, gamma_ln=2.0 12 | tempi=300.0, temp0=300.0 13 | nstlim=100000000, dt=0.001 14 | ntpr=1000, ntwx=10000, 15 | ntwr=20000 16 | / 17 | -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/simulation.in: -------------------------------------------------------------------------------- 1 | 100ns cmd simulation input 300K 2 | &cntrl 3 | ntb=2 4 | ntp=1, pres0=1.0, taup=2.0 5 | iwrap=1 6 | ioutfm=1 7 | ntxo=2 8 | ntx=5, irest=1 9 | cut=10.0 10 | ntc=2, ntf=2 11 | ntt=3, gamma_ln=2.0 12 | tempi=300.0, temp0=300.0 13 | nstlim=100000000, dt=0.001 14 | ntpr=1000, ntwx=10000, 15 | ntwr=20000 16 | / 17 | -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/simulation_cart.in: -------------------------------------------------------------------------------- 1 | 100ns cmd simulation input 300K 2 | &cntrl 3 | ntb=2 4 | ntp=1, pres0=1.0, taup=2.0 5 | iwrap=1 6 | ioutfm=1 7 | ntxo=2 8 | ntx=5, irest=1 9 | cut=10.0 10 | ntc=2, ntf=2 11 | ntt=3, gamma_ln=2.0 12 | tempi=300.0, temp0=300.0 13 | nstlim=100000000, dt=0.001 14 | ntpr=1000, ntwx=10000, 15 | ntwr=20000, ntr=1, 16 | here 17 | / 18 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/sqm.in: -------------------------------------------------------------------------------- 1 | Run semi-empirical minimization 2 | &qmmm 3 | qm_theory='AM1', grms_tol=0.0005, 4 | scfconv=1.d-10, ndiis_attempts=700, qmcharge=0, 5 | / 6 | 7 N5 -3.1790 1.8000 -1.0170 7 | 1 H6 -3.0300 2.6900 -0.5150 8 | 1 H7 -4.1560 1.8000 -1.3560 9 | 1 H8 -2.5670 1.8150 -1.8480 10 | 11 | -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/cluster_kmeans.in: -------------------------------------------------------------------------------- 1 | parm LIG_dry.prmtop 2 | trajin dry_aligned.nc 3 | cluster c1 \ 4 | kmeans clusters 10 randompoint maxit 500 \ 5 | rms !@H= \ 6 | sieve 10 random \ 7 | out cnumvtime.dat \ 8 | summary summary.dat \ 9 | info info.dat \ 10 | cpopvtime cpopvtime.agr normframe \ 11 | repout rep repfmt pdb \ 12 | singlerepout singlerep.nc singlerepfmt netcdf \ 13 | avgout avg avgfmt pdb 14 | run -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/simulation_restraint.in: -------------------------------------------------------------------------------- 1 | 100ns cmd simulation input 300K 2 | &cntrl 3 | ntb=2 4 | ntp=1, pres0=1.0, taup=2.0 5 | iwrap=1 6 | ioutfm=1 7 | ntxo=2 8 | ntx=5, irest=1 9 | cut=10.0 10 | ntc=2, ntf=2 11 | ntt=3, gamma_ln=2.0 12 | tempi=300.0, temp0=300.0 13 | nstlim=100000000, dt=0.001 14 | ntpr=1000, ntwx=10000, 15 | ntwr=20000, nmropt=1 16 | / 17 | &wt TYPE='END' / 18 | DISANG=disang.r 19 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_standard.fingerprint: -------------------------------------------------------------------------------- 1 | 1-PT-PT 1 PT -> M1 2 | 2-B-N1 2 n3 -> Y1 3 | 2-B-H2 3 hn -> hn 4 | 2-B-H3 4 hn -> hn 5 | 2-B-H4 5 hn -> hn 6 | 3-C-N5 6 n3 -> Y2 7 | 3-C-H6 7 hn -> hn 8 | 3-C-H7 8 hn -> hn 9 | 3-C-H8 9 hn -> hn 10 | 4-D-CL8 10 Cl -> Y5 11 | 5-E-CL9 11 Cl -> Y6 12 | LINK 1-PT 2-N1 13 | LINK 1-PT 6-N5 14 | LINK 1-PT 10-CL8 15 | LINK 1-PT 11-CL9 16 | LINK 1-PT 10-CL8 17 | LINK 1-PT 11-CL9 18 | LINK 1-PT 10-CL8 19 | LINK 1-PT 11-CL9 20 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_dry.inpcrd: -------------------------------------------------------------------------------- 1 | default_name 2 | 11 3 | -2.8800000 0.1370000 0.1800000 -0.9030000 0.6430000 0.5270000 4 | -0.7930000 1.5590000 0.9910000 -0.3360000 0.6700000 -0.3350000 5 | -0.4790000 -0.0670000 1.1490000 -3.1790000 1.8000000 -1.0170000 6 | -3.0300000 2.6900000 -0.5150000 -4.1560000 1.8000000 -1.3560000 7 | -2.5670000 1.8150000 -1.8480000 -2.4950000 -1.7360000 1.5460000 8 | -5.1290000 -0.3990000 -0.2470000 9 | -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/strip.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Preparing to analyse trajectory" 4 | echo "please enter the id of the atoms that should be used for alignment in the format: 1,2,4-10" 5 | 6 | read atoms 7 | 8 | echo "Aligning simulation on $atoms" 9 | 10 | sed -i "s/replaceme/$atoms/g" align.in 11 | sed -i "s/replaceme/$atoms/g" align_dry.in 12 | 13 | cpptraj < align.in 14 | cpptraj < dry_sim.in 15 | cpptraj < align_dry.in 16 | cpptraj < cluster_kmeans.in 17 | 18 | echo "done" -------------------------------------------------------------------------------- /tests/TestReference/input.xyz: -------------------------------------------------------------------------------- 1 | 11 2 | Modified XYZ file for MCPB.py - PyConSolv 3 | Pt -2.87200000 0.14700000 0.17500000 4 | N -0.89000000 0.63600000 0.53600000 5 | H -0.77000000 1.54500000 1.01000000 6 | H -0.31200000 0.65800000 -0.31800000 7 | H -0.49200000 -0.09000000 1.15800000 8 | N -3.19200000 1.80700000 -1.02600000 9 | H -3.05300000 2.70200000 -0.53200000 10 | H -4.17500000 1.78100000 -1.34800000 11 | H -2.59300000 1.82500000 -1.86600000 12 | Cl -2.48100000 -1.71900000 1.54000000 13 | Cl -5.11600000 -0.38200000 -0.25300000 14 | -------------------------------------------------------------------------------- /tests/TestReference/input.xyz.original: -------------------------------------------------------------------------------- 1 | 11 2 | Modified XYZ file for MCPB.py - PyConSolv 3 | Pt -2.87200000 0.14700000 0.17500000 4 | N -0.89000000 0.63600000 0.53600000 5 | H -0.77000000 1.54500000 1.01000000 6 | H -0.31200000 0.65800000 -0.31800000 7 | H -0.49200000 -0.09000000 1.15800000 8 | N -3.19200000 1.80700000 -1.02600000 9 | H -3.05300000 2.70200000 -0.53200000 10 | H -4.17500000 1.78100000 -1.34800000 11 | H -2.59300000 1.82500000 -1.86600000 12 | Cl -2.48100000 -1.71900000 1.54000000 13 | Cl -5.11600000 -0.38200000 -0.25300000 14 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/input.xyz: -------------------------------------------------------------------------------- 1 | 11 2 | Modified XYZ file for MCPB.py - PyConSolv 3 | Pt -2.87200000 0.14700000 0.17500000 4 | N -0.89000000 0.63600000 0.53600000 5 | H -0.77000000 1.54500000 1.01000000 6 | H -0.31200000 0.65800000 -0.31800000 7 | H -0.49200000 -0.09000000 1.15800000 8 | N -3.19200000 1.80700000 -1.02600000 9 | H -3.05300000 2.70200000 -0.53200000 10 | H -4.17500000 1.78100000 -1.34800000 11 | H -2.59300000 1.82500000 -1.86600000 12 | Cl -2.48100000 -1.71900000 1.54000000 13 | Cl -5.11600000 -0.38200000 -0.25300000 14 | -------------------------------------------------------------------------------- /tests/TestReference/equilibration/mdinfo: -------------------------------------------------------------------------------- 1 | 2 | NSTEP = 0 TIME(PS) = 0.000 TEMP(K) = 457.76 PRESS = -200.2 3 | Etot = -15078.5206 EKtot = 4269.4708 EPtot = -19347.9914 4 | BOND = 0.5759 ANGLE = 5.6645 DIHED = 0.0000 5 | 1-4 NB = -0.1422 1-4 EEL = -209.7935 VDWAALS = 2750.8450 6 | EELEC = -21895.1411 EHBOND = 0.0000 RESTRAINT = 0.0000 7 | EKCMT = 1459.3615 VIRIAL = 1662.0554 VOLUME = 46889.7991 8 | Density = 1.0059 9 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/B1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | B1 3 | 4 3 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 N1 -0.9030 0.6430 0.5270 Y1 2 B1 -0.544576 10 | 2 H2 -0.7930 1.5590 0.9910 hn 2 B1 0.344758 11 | 3 H3 -0.3360 0.6700 -0.3350 hn 2 B1 0.344115 12 | 4 H4 -0.4790 -0.0670 1.1490 hn 2 B1 0.311730 13 | @BOND 14 | 1 1 2 1 15 | 2 1 3 1 16 | 3 1 4 1 17 | @SUBSTRUCTURE 18 | 1 B1 1 TEMP 0 **** **** 0 ROOT 19 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/C1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | C1 3 | 4 3 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 N5 -3.1790 1.8000 -1.0170 Y2 3 C1 -0.534107 10 | 2 H6 -3.0300 2.6900 -0.5150 hn 3 C1 0.341074 11 | 3 H7 -4.1560 1.8000 -1.3560 hn 3 C1 0.308718 12 | 4 H8 -2.5670 1.8150 -1.8480 hn 3 C1 0.342291 13 | @BOND 14 | 1 1 2 1 15 | 2 1 3 1 16 | 3 1 4 1 17 | @SUBSTRUCTURE 18 | 1 C1 1 TEMP 0 **** **** 0 ROOT 19 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_small_opt.com: -------------------------------------------------------------------------------- 1 | %Chk=LIG_small_opt.chk 2 | %Mem=3000MB 3 | %NProcShared=2 4 | # B3LYP/6-31G* Geom=PrintInputOrient Integral=(Grid=UltraFine) Opt 5 | 6 | CLR 7 | 8 | 0 1 9 | Pt -2.880 0.137 0.180 10 | N -0.903 0.643 0.527 11 | H -0.793 1.559 0.991 12 | H -0.336 0.670 -0.335 13 | H -0.479 -0.067 1.149 14 | N -3.179 1.800 -1.017 15 | H -3.030 2.690 -0.515 16 | H -4.156 1.800 -1.356 17 | H -2.567 1.815 -1.848 18 | Cl -2.495 -1.736 1.546 19 | Cl -5.129 -0.399 -0.247 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/B.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | B 3 | 4 3 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 N1 -0.9030 0.6430 0.5270 n3 2 B -1.010400 10 | 2 H2 -0.7930 1.5590 0.9910 hn 2 B 0.336800 11 | 3 H3 -0.3360 0.6700 -0.3350 hn 2 B 0.336800 12 | 4 H4 -0.4790 -0.0670 1.1490 hn 2 B 0.336800 13 | @BOND 14 | 1 1 2 1 15 | 2 1 3 1 16 | 3 1 4 1 17 | @SUBSTRUCTURE 18 | 1 B 1 TEMP 0 **** **** 0 ROOT 19 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/C.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | C 3 | 4 3 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 N5 -3.1790 1.8000 -1.0170 n3 3 C -1.010400 10 | 2 H6 -3.0300 2.6900 -0.5150 hn 3 C 0.336800 11 | 3 H7 -4.1560 1.8000 -1.3560 hn 3 C 0.336800 12 | 4 H8 -2.5670 1.8150 -1.8480 hn 3 C 0.336800 13 | @BOND 14 | 1 1 2 1 15 | 2 1 3 1 16 | 3 1 4 1 17 | @SUBSTRUCTURE 18 | 1 C 1 TEMP 0 **** **** 0 ROOT 19 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/orca_freq.molden.chg: -------------------------------------------------------------------------------- 1 | Pt -2.880097 0.137115 0.179582 -0.0497105584 2 | N -0.902957 0.642540 0.527260 -0.5445760109 3 | H -0.793048 1.558516 0.990731 0.3447584260 4 | H -0.335736 0.669677 -0.334984 0.3441152090 5 | H -0.479046 -0.067106 1.148699 0.3117300280 6 | N -3.179044 1.799738 -1.016538 -0.5341066426 7 | H -3.029978 2.689802 -0.515079 0.3410737786 8 | H -4.155915 1.799800 -1.355920 0.3087176992 9 | H -2.566813 1.815405 -1.847614 0.3422905444 10 | Cl -2.494743 -1.736488 1.546479 -0.4322028118 11 | Cl -5.128625 -0.398997 -0.246616 -0.4320896615 12 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/NH3.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | NH3 3 | 4 3 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 N -6.7010 -1.5780 -1.1230 n3 1 NH3 -1.1037675936 10 | 2 H -5.6880 -1.6280 -1.1320 hn 1 NH3 0.3679969847 11 | 3 H1 -7.0140 -2.2360 -0.4180 hn 1 NH3 0.3678186059 12 | 4 H2 -7.0140 -1.9420 -2.0160 hn 1 NH3 0.3679520030 13 | @BOND 14 | 1 1 2 1 15 | 2 1 3 1 16 | 3 1 4 1 17 | @SUBSTRUCTURE 18 | 1 NH3 1 TEMP 0 **** **** 0 ROOT 19 | -------------------------------------------------------------------------------- /src/PyConSolv/interfaces/mdengines.py: -------------------------------------------------------------------------------- 1 | from .amber import amberInterface 2 | from .gromacs import gromacsInterface 3 | 4 | 5 | class MDEngine: 6 | def __init__(self, path: str, engine: str = 'amber'): 7 | self.status = 1 8 | match engine: 9 | case 'amber': 10 | self.MD = amberInterface(path) 11 | case 'gromacs': 12 | self.MD = gromacsInterface(path) 13 | 14 | def run(self, path, cpus, restrain: str=None, cart: str = None, cartstr: int = 100): 15 | self.MD.prepare(path,restrain = restrain, cart= cart, cartstr = cartstr) 16 | self.status = self.MD.equilibrate(cpus) 17 | return self.status 18 | 19 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_large_mk.com: -------------------------------------------------------------------------------- 1 | %Chk=LIG_large_mk.chk 2 | %Mem=3000MB 3 | %NProcShared=2 4 | # B3LYP/6-31G* Integral=(Grid=UltraFine) Pop(MK,ReadRadii) 5 | IOp(6/33=2,6/42=6) 6 | 7 | CLR 8 | 9 | 0 1 10 | Pt -2.880 0.137 0.180 11 | N -0.903 0.643 0.527 12 | H -0.793 1.559 0.991 13 | H -0.336 0.670 -0.335 14 | H -0.479 -0.067 1.149 15 | N -3.179 1.800 -1.017 16 | H -3.030 2.690 -0.515 17 | H -4.156 1.800 -1.356 18 | H -2.567 1.815 -1.848 19 | Cl -2.495 -1.736 1.546 20 | Cl -5.129 -0.399 -0.247 21 | 22 | Pt 1.219 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/PF6.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | P 30.970 1.538 same as p5 4 | f1 19.000 0.320 5 | f2 19.000 0.320 6 | f3 19.000 0.320 7 | 8 | BOND 9 | P-f1 248.60 1.650 10 | P-f2 248.60 1.650 11 | P-f3 248.60 1.650 12 | 13 | ANGLE 14 | f1-P-f1 211.8000 180.0 15 | f1-P-f2 211.8000 90.0 16 | f1-P-f3 211.8000 90.0 17 | f2-P-f2 211.8000 180.0 18 | f2-P-f3 211.8000 90.0 19 | f3-P-f3 211.8000 180.0 20 | 21 | DIHE 22 | 23 | IMPROPER 24 | 25 | NONBON 26 | P 2.1000 0.2000 same as p5 27 | f1 1.7500 0.0610 28 | f2 1.7500 0.0610 29 | f3 1.7500 0.0610 30 | 31 | 32 | -------------------------------------------------------------------------------- /conda/meta.yaml: -------------------------------------------------------------------------------- 1 | package: 2 | name: pyconsolv 3 | version: 0.2.1.1 4 | 5 | build: 6 | number: 1 7 | entry_points: 8 | - pyconsolv = PyConSolv.pyconsolv:main 9 | script: python setup.py install --single-version-externally-managed --record=record.txt 10 | 11 | requirements: 12 | build: 13 | - python 14 | run: 15 | - python >=3.10 16 | - numpy >=1.23.1 17 | - pandas >=1.4.3 18 | - matplotlib >=3.5.3 19 | # - rdkit >=2022.09.1 20 | 21 | about: 22 | summary: "A package for conformer generation of transition-metal-containing complexes" 23 | 24 | source: 25 | # url: https://test-files.pythonhosted.org/packages/b5/76/3993421c6940cc91863c166805d277df954bb84223dce9bdff0031a1f5bf/pyconsolv-0.2.1.6.tar.gz 26 | path: .. -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_small_opt.inp: -------------------------------------------------------------------------------- 1 | $SYSTEM MEMDDI=400 MWORDS=200 $END 2 | $CONTRL DFTTYP=B3LYP RUNTYP=OPTIMIZE ICHARG=0 MULT=1 $END 3 | $STATPT NSTEP=1000 $END 4 | $BASIS GBASIS=N31 NGAUSS=6 NDFUNC=1 $END 5 | $DATA 6 | Cluster/6-31G 7 | C1 8 | Pt 78.0 -2.880 0.137 0.180 9 | N 7.0 -0.903 0.643 0.527 10 | H 1.0 -0.793 1.559 0.991 11 | H 1.0 -0.336 0.670 -0.335 12 | H 1.0 -0.479 -0.067 1.149 13 | N 7.0 -3.179 1.800 -1.017 14 | H 1.0 -3.030 2.690 -0.515 15 | H 1.0 -4.156 1.800 -1.356 16 | H 1.0 -2.567 1.815 -1.848 17 | Cl 17.0 -2.495 -1.736 1.546 18 | Cl 17.0 -5.129 -0.399 -0.247 19 | $END 20 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_large.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 PT PT A 1 -2.880 0.137 0.180 1.00 0.00 2 | HETATM 2 N1 B A 2 -0.903 0.643 0.527 1.00 0.00 3 | HETATM 3 H2 B A 2 -0.793 1.559 0.991 1.00 0.00 4 | HETATM 4 H3 B A 2 -0.336 0.670 -0.335 1.00 0.00 5 | HETATM 5 H4 B A 2 -0.479 -0.067 1.149 1.00 0.00 6 | HETATM 6 N5 C A 3 -3.179 1.800 -1.017 1.00 0.00 7 | HETATM 7 H6 C A 3 -3.030 2.690 -0.515 1.00 0.00 8 | HETATM 8 H7 C A 3 -4.156 1.800 -1.356 1.00 0.00 9 | HETATM 9 H8 C A 3 -2.567 1.815 -1.848 1.00 0.00 10 | HETATM 10 CL8 D A 4 -2.495 -1.736 1.546 1.00 0.00 11 | HETATM 11 CL9 E A 5 -5.129 -0.399 -0.247 1.00 0.00 12 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_small.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 PT PT A 1 -2.880 0.137 0.180 1.00 0.00 2 | HETATM 2 N1 B A 2 -0.903 0.643 0.527 1.00 0.00 3 | HETATM 3 H2 B A 2 -0.793 1.559 0.991 1.00 0.00 4 | HETATM 4 H3 B A 2 -0.336 0.670 -0.335 1.00 0.00 5 | HETATM 5 H4 B A 2 -0.479 -0.067 1.149 1.00 0.00 6 | HETATM 6 N5 C A 3 -3.179 1.800 -1.017 1.00 0.00 7 | HETATM 7 H6 C A 3 -3.030 2.690 -0.515 1.00 0.00 8 | HETATM 8 H7 C A 3 -4.156 1.800 -1.356 1.00 0.00 9 | HETATM 9 H8 C A 3 -2.567 1.815 -1.848 1.00 0.00 10 | HETATM 10 CL8 D A 4 -2.495 -1.736 1.546 1.00 0.00 11 | HETATM 11 CL9 E A 5 -5.129 -0.399 -0.247 1.00 0.00 12 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/BF4.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | BF4 3 | 5 4 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 B0 -0.3700 -0.1030 -1.0730 B 1 BF4 0.6839420 10 | 2 F1 0.5580 0.2340 -0.0590 f 1 BF4 -0.4209855 11 | 3 F2 -0.8000 1.0740 -1.7310 f 1 BF4 -0.4209855 12 | 4 F3 0.2460 -0.9690 -2.0090 f 1 BF4 -0.4209855 13 | 5 F4 -1.4850 -0.7540 -0.4920 f 1 BF4 -0.4209855 14 | @BOND 15 | 1 1 2 1 16 | 2 1 3 1 17 | 3 1 4 1 18 | 4 1 5 1 19 | @SUBSTRUCTURE 20 | 1 BF4 1 TEMP 0 **** **** 0 ROOT 21 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_standard.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 PT PT A 1 -2.880 0.137 0.180 1.00 0.00 2 | HETATM 2 N1 B A 2 -0.903 0.643 0.527 1.00 0.00 3 | HETATM 3 H2 B A 2 -0.793 1.559 0.991 1.00 0.00 4 | HETATM 4 H3 B A 2 -0.336 0.670 -0.335 1.00 0.00 5 | HETATM 5 H4 B A 2 -0.479 -0.067 1.149 1.00 0.00 6 | HETATM 6 N5 C A 3 -3.179 1.800 -1.017 1.00 0.00 7 | HETATM 7 H6 C A 3 -3.030 2.690 -0.515 1.00 0.00 8 | HETATM 8 H7 C A 3 -4.156 1.800 -1.356 1.00 0.00 9 | HETATM 9 H8 C A 3 -2.567 1.815 -1.848 1.00 0.00 10 | HETATM 10 CL8 D A 4 -2.495 -1.736 1.546 1.00 0.00 11 | HETATM 11 CL9 E A 5 -5.129 -0.399 -0.247 1.00 0.00 12 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/CL3.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | CL3 3 | 5 4 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -6.0120 -1.3020 -1.6710 c3 1 CL3 -0.2873957191 10 | 2 Cl -4.2400 -1.2660 -1.6980 cl 1 CL3 -0.0104081737 11 | 3 H -6.3720 -0.4820 -2.2780 h3 1 CL3 0.3185169266 12 | 4 Cl1 -6.6240 -1.0760 -0.0230 cl 1 CL3 -0.0104290882 13 | 5 Cl2 -6.6230 -2.8120 -2.3690 cl 1 CL3 -0.0102839456 14 | @BOND 15 | 1 1 2 1 16 | 2 1 3 1 17 | 3 1 4 1 18 | 4 1 5 1 19 | @SUBSTRUCTURE 20 | 1 CL3 1 TEMP 0 **** **** 0 ROOT 21 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/CL4.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | CL4 3 | 5 4 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -5.9740 -1.3870 -1.6080 c3 1 CL4 -0.4336925562 10 | 2 Cl -4.1990 -1.3870 -1.6080 cl 1 CL4 0.1085666294 11 | 3 Cl1 -6.5660 -0.0420 -2.6030 cl 1 CL4 0.1083293231 12 | 4 Cl2 -6.5660 -1.1980 0.0550 cl 1 CL4 0.1083919737 13 | 5 Cl3 -6.5660 -2.9220 -2.2750 cl 1 CL4 0.1084046300 14 | @BOND 15 | 1 1 2 1 16 | 2 1 3 1 17 | 3 1 4 1 18 | 4 1 5 1 19 | @SUBSTRUCTURE 20 | 1 UNL 1 TEMP 0 **** **** 0 ROOT 21 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/DCM.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | DCM 3 | 5 4 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -6.0650 -1.2700 -1.5570 c3 1 DCM -0.1949651157 10 | 2 Cl -4.2860 -1.2330 -1.5410 cl 1 DCM -0.1210486176 11 | 3 H -6.4120 -0.4610 -2.1850 h2 1 DCM 0.2186241899 12 | 4 H1 -6.4120 -1.1780 -0.5360 h2 1 DCM 0.2186241899 13 | 5 Cl1 -6.6960 -2.7960 -2.2200 cl 1 DCM -0.1212346465 14 | @BOND 15 | 1 1 2 1 16 | 2 1 3 1 17 | 3 1 4 1 18 | 4 1 5 1 19 | @SUBSTRUCTURE 20 | 1 DCM 1 TEMP 0 **** **** 0 ROOT 21 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/CLO.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | CLO 3 | 5 4 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 CL0 -0.3700 -0.1040 -1.0730 cl 1 CLO 1.097562111 10 | 2 O1 0.6210 0.2570 0.0090 o 1 CLO -0.524390528 11 | 3 O2 -0.8280 1.1530 -1.7750 o 1 CLO -0.524390528 12 | 4 O3 0.2870 -1.0270 -2.0720 o 1 CLO -0.524390528 13 | 5 O4 -1.5600 -0.7980 -0.4540 o 1 CLO -0.524390528 14 | @BOND 15 | 1 1 2 1 16 | 2 1 3 1 17 | 3 1 4 1 18 | 4 1 5 1 19 | @SUBSTRUCTURE 20 | 1 CLO 1 TEMP 0 **** **** 0 ROOT 21 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_large_mk.inp: -------------------------------------------------------------------------------- 1 | $SYSTEM MEMDDI=400 MWORDS=200 $END 2 | $CONTRL DFTTYP=B3LYP ICHARG=0 MULT=1 $END 3 | $ELPOT IEPOT=1 WHERE=PDC $END 4 | $PDC PTSEL=CONNOLLY CONSTR=NONE $END 5 | $BASIS GBASIS=N31 NGAUSS=6 NDFUNC=1 $END 6 | $DATA 7 | Cluster/6-31G(d) 8 | C1 9 | Pt 78.0 -2.880 0.137 0.180 10 | N 7.0 -0.903 0.643 0.527 11 | H 1.0 -0.793 1.559 0.991 12 | H 1.0 -0.336 0.670 -0.335 13 | H 1.0 -0.479 -0.067 1.149 14 | N 7.0 -3.179 1.800 -1.017 15 | H 1.0 -3.030 2.690 -0.515 16 | H 1.0 -4.156 1.800 -1.356 17 | H 1.0 -2.567 1.815 -1.848 18 | Cl 17.0 -2.495 -1.736 1.546 19 | Cl 17.0 -5.129 -0.399 -0.247 20 | $END 21 | -------------------------------------------------------------------------------- /tests/Testfiles/input.xyz: -------------------------------------------------------------------------------- 1 | 11 2 | Coordinates from ORCA-job orca_opt 3 | Pt -2.87230798659401 0.14721348072683 0.17546034749719 4 | N -0.88989957657788 0.63642335367661 0.53637082687021 5 | H -0.77026521067021 1.54534480068763 1.01038980364939 6 | H -0.31174365804595 0.65752973296537 -0.31832161373880 7 | H -0.49249056675031 -0.08959617244195 1.15784869728947 8 | N -3.19190674132390 1.80661441861532 -1.02584679251076 9 | H -3.05341968957919 2.70203475465697 -0.53167480371952 10 | H -4.17512017740942 1.78134191892754 -1.34812184927424 11 | H -2.59336275109607 1.82503978973976 -1.86635777150009 12 | Cl -2.48097142519675 -1.71899765662894 1.53969819953349 13 | Cl -5.11551221675628 -0.38194842092516 -0.25344504409633 14 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/input.xyz: -------------------------------------------------------------------------------- 1 | 11 2 | Coordinates from ORCA-job orca_opt 3 | Pt -2.88009665898666 0.13711452671512 0.17958205940694 4 | N -0.90295654432358 0.64253964137048 0.52726036110145 5 | H -0.79304759294210 1.55851647774430 0.99073099069202 6 | H -0.33573588142051 0.66967662454773 -0.33498360161146 7 | H -0.47904553381102 -0.06710600102538 1.14869876092940 8 | N -3.17904384511349 1.79973790188282 -1.01653808902441 9 | H -3.02997794203513 2.68980150929565 -0.51507930580242 10 | H -4.15591497422106 1.79979985468779 -1.35592036371774 11 | H -2.56681280883726 1.81540487663182 -1.84761390387901 12 | Cl -2.49474326082407 -1.73648800708926 1.54647884743811 13 | Cl -5.12862495748510 -0.39899740476108 -0.24661575553289 14 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_dry.pdb: -------------------------------------------------------------------------------- 1 | ATOM 1 PT PT1 1 -2.880 0.137 0.180 1.00 0.00 2 | TER 3 | ATOM 2 N1 B1 2 -0.903 0.643 0.527 1.00 0.00 4 | ATOM 3 H2 B1 2 -0.793 1.559 0.991 1.00 0.00 5 | ATOM 4 H3 B1 2 -0.336 0.670 -0.335 1.00 0.00 6 | ATOM 5 H4 B1 2 -0.479 -0.067 1.149 1.00 0.00 7 | TER 8 | ATOM 6 N5 C1 3 -3.179 1.800 -1.017 1.00 0.00 9 | ATOM 7 H6 C1 3 -3.030 2.690 -0.515 1.00 0.00 10 | ATOM 8 H7 C1 3 -4.156 1.800 -1.356 1.00 0.00 11 | ATOM 9 H8 C1 3 -2.567 1.815 -1.848 1.00 0.00 12 | TER 13 | ATOM 10 CL8 D1 4 -2.495 -1.736 1.546 1.00 0.00 14 | TER 15 | ATOM 11 CL9 E1 5 -5.129 -0.399 -0.247 1.00 0.00 16 | TER 17 | END 18 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/antechamber_B.out: -------------------------------------------------------------------------------- 1 | 2 | Welcome to antechamber 21.0: molecular input file processor. 3 | 4 | acdoctor mode is on: check and diagnose problems in the input file. 5 | The atom type is set to gaff; the options available to the -at flag are 6 | gaff, gaff2, amber, bcc, and sybyl. 7 | -- Check Format for pdb File -- 8 | Status: pass 9 | -- Check Unusual Elements -- 10 | Status: pass 11 | -- Check Open Valences -- 12 | Status: pass 13 | -- Check Geometry -- 14 | for those bonded 15 | for those not bonded 16 | Status: pass 17 | -- Check Weird Bonds -- 18 | Status: pass 19 | -- Check Number of Units -- 20 | Status: pass 21 | acdoctor mode has completed checking the input file. 22 | 23 | Info: Total number of electrons: 10; net charge: 0 24 | 25 | Running: /usr/local/bin/amber20/bin/sqm -O -i sqm.in -o sqm.out 26 | 27 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/antechamber_C.out: -------------------------------------------------------------------------------- 1 | 2 | Welcome to antechamber 21.0: molecular input file processor. 3 | 4 | acdoctor mode is on: check and diagnose problems in the input file. 5 | The atom type is set to gaff; the options available to the -at flag are 6 | gaff, gaff2, amber, bcc, and sybyl. 7 | -- Check Format for pdb File -- 8 | Status: pass 9 | -- Check Unusual Elements -- 10 | Status: pass 11 | -- Check Open Valences -- 12 | Status: pass 13 | -- Check Geometry -- 14 | for those bonded 15 | for those not bonded 16 | Status: pass 17 | -- Check Weird Bonds -- 18 | Status: pass 19 | -- Check Number of Units -- 20 | Status: pass 21 | acdoctor mode has completed checking the input file. 22 | 23 | Info: Total number of electrons: 10; net charge: 0 24 | 25 | Running: /usr/local/bin/amber20/bin/sqm -O -i sqm.in -o sqm.out 26 | 27 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/input.xyz: -------------------------------------------------------------------------------- 1 | 11 2 | Coordinates from ORCA-job orca_opt 3 | Pt -2.88009665898666 0.13711452671512 0.17958205940694 4 | N -0.90295654432358 0.64253964137048 0.52726036110145 5 | H -0.79304759294210 1.55851647774430 0.99073099069202 6 | H -0.33573588142051 0.66967662454773 -0.33498360161146 7 | H -0.47904553381102 -0.06710600102538 1.14869876092940 8 | N -3.17904384511349 1.79973790188282 -1.01653808902441 9 | H -3.02997794203513 2.68980150929565 -0.51507930580242 10 | H -4.15591497422106 1.79979985468779 -1.35592036371774 11 | H -2.56681280883726 1.81540487663182 -1.84761390387901 12 | Cl -2.49474326082407 -1.73648800708926 1.54647884743811 13 | Cl -5.12862495748510 -0.39899740476108 -0.24661575553289 14 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt.xyz: -------------------------------------------------------------------------------- 1 | 11 2 | Coordinates from ORCA-job orca_opt 3 | Pt -2.88009665898666 0.13711452671512 0.17958205940694 4 | N -0.90295654432358 0.64253964137048 0.52726036110145 5 | H -0.79304759294210 1.55851647774430 0.99073099069202 6 | H -0.33573588142051 0.66967662454773 -0.33498360161146 7 | H -0.47904553381102 -0.06710600102538 1.14869876092940 8 | N -3.17904384511349 1.79973790188282 -1.01653808902441 9 | H -3.02997794203513 2.68980150929565 -0.51507930580242 10 | H -4.15591497422106 1.79979985468779 -1.35592036371774 11 | H -2.56681280883726 1.81540487663182 -1.84761390387901 12 | Cl -2.49474326082407 -1.73648800708926 1.54647884743811 13 | Cl -5.12862495748510 -0.39899740476108 -0.24661575553289 14 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_mcpbpy.pdb: -------------------------------------------------------------------------------- 1 | REMARK, BUILD BY MCPB.PY 2 | HETATM 1 PT PT1 A 1 -2.880 0.137 0.180 1.00 0.00 3 | TER 4 | HETATM 2 N1 B1 A 2 -0.903 0.643 0.527 1.00 0.00 5 | HETATM 3 H2 B1 A 2 -0.793 1.559 0.991 1.00 0.00 6 | HETATM 4 H3 B1 A 2 -0.336 0.670 -0.335 1.00 0.00 7 | HETATM 5 H4 B1 A 2 -0.479 -0.067 1.149 1.00 0.00 8 | TER 9 | HETATM 6 N5 C1 A 3 -3.179 1.800 -1.017 1.00 0.00 10 | HETATM 7 H6 C1 A 3 -3.030 2.690 -0.515 1.00 0.00 11 | HETATM 8 H7 C1 A 3 -4.156 1.800 -1.356 1.00 0.00 12 | HETATM 9 H8 C1 A 3 -2.567 1.815 -1.848 1.00 0.00 13 | TER 14 | HETATM 10 CL8 D1 A 4 -2.495 -1.736 1.546 1.00 0.00 15 | TER 16 | HETATM 11 CL9 E1 A 5 -5.129 -0.399 -0.247 1.00 0.00 17 | END 18 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/counterion.py: -------------------------------------------------------------------------------- 1 | from .ions import ionlib 2 | from .tleapAdderInterface import TleapAdder 3 | 4 | 5 | class Counterion(TleapAdder): 6 | def __init__(self): 7 | """ 8 | Class to modify the tleap file and manage the different solvents 9 | 10 | Parameters: 11 | 12 | """ 13 | self.counterionDict = {'OTf-': 'OTF', 14 | 'BF4-': 'BF4', 15 | 'BARF-': 'BAR', 16 | 'PFC-': 'PFC', 17 | 'ScF6-': 'SCF', 18 | 'ClO4-': 'CLO', 19 | 'BPh4-': 'BPH', 20 | 'custom': 'CTI'} 21 | ions = ionlib() 22 | self.counterionDict.update(ions.ionsinAmber) 23 | TleapAdder.__init__(self, '../counterions', self.counterionDict, 'counterion') -------------------------------------------------------------------------------- /src/PyConSolv/solvents/ACN.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | ACN 3 | 6 5 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -5.9400 0.9170 0.1910 c1 1 ACN 0.4902624314 10 | 2 C1 -4.4930 0.8640 0.0450 c3 1 ACN -0.4091677625 11 | 3 N1 -7.0900 0.9580 0.3070 n1 1 ACN -0.6043924224 12 | 4 H1 -4.2160 0.0020 -0.5590 hc 1 ACN 0.1744325845 13 | 5 H2 -4.0280 0.7800 1.0250 hc 1 ACN 0.1744325845 14 | 6 H3 -4.1400 1.7710 -0.4430 hc 1 ACN 0.1744325845 15 | @BOND 16 | 1 1 2 1 17 | 2 1 3 3 18 | 3 2 4 1 19 | 4 2 5 1 20 | 5 2 6 1 21 | @SUBSTRUCTURE 22 | 1 ACN 1 TEMP 0 **** **** 0 ROOT 23 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/MTL.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | MTL 3 | 6 5 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 H -5.4720 2.9030 -0.0370 h1 1 MTL 0.0047136822 10 | 2 C -4.3800 2.9220 -0.0510 c3 1 MTL 0.2512784447 11 | 3 H1 -4.0420 3.2450 -1.0380 h1 1 MTL 0.0047136822 12 | 4 H2 -4.0110 1.9150 0.1310 h1 1 MTL 0.0047136822 13 | 5 O -3.8540 3.7510 0.9840 oh 1 MTL -0.7068178586 14 | 6 H3 -4.1680 4.6500 0.8330 ho 1 MTL 0.4413983673 15 | @BOND 16 | 1 1 2 1 17 | 2 2 3 1 18 | 3 2 4 1 19 | 4 2 5 1 20 | 5 5 6 1 21 | @SUBSTRUCTURE 22 | 1 MTL 1 TEMP 0 **** **** 0 ROOT 23 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/Full_PDB.pdb: -------------------------------------------------------------------------------- 1 | HETATM 1 PT PT 1 1 -2.88 0.137 0.18 1.00 0.00 PT 2 | HETATM 2 N1 B 2 2 -0.903 0.643 0.527 1.00 0.00 N 3 | HETATM 3 H2 B 2 2 -0.793 1.559 0.991 1.00 0.00 H 4 | HETATM 4 H3 B 2 2 -0.336 0.67 -0.335 1.00 0.00 H 5 | HETATM 5 H4 B 2 2 -0.479 -0.067 1.149 1.00 0.00 H 6 | HETATM 6 N5 C 3 3 -3.179 1.8 -1.017 1.00 0.00 N 7 | HETATM 7 H6 C 3 3 -3.03 2.69 -0.515 1.00 0.00 H 8 | HETATM 8 H7 C 3 3 -4.156 1.8 -1.356 1.00 0.00 H 9 | HETATM 9 H8 C 3 3 -2.567 1.815 -1.848 1.00 0.00 H 10 | HETATM 10 CL8 D 4 4 -2.495 -1.736 1.546 1.00 0.00 Cl 11 | HETATM 11 CL9 E 5 5 -5.129 -0.399 -0.247 1.00 0.00 Cl 12 | END -------------------------------------------------------------------------------- /src/PyConSolv/counterions/SCF.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | SCF 3 | 7 6 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 SC -0.8490 0.0000 -0.1180 SC 1 SCF 1.04424511 10 | 2 F0 -0.8490 -0.0000 -2.1520 f1 1 SCF -0.674040852 11 | 3 F1 -0.8490 0.0000 1.9150 f1 1 SCF -0.674040852 12 | 4 F2 -0.8490 2.0330 -0.1180 f2 1 SCF -0.674040852 13 | 5 F3 -0.8490 -2.0330 -0.1180 f2 1 SCF -0.674040852 14 | 6 F4 -2.8820 -0.0000 -0.1180 f3 1 SCF -0.674040852 15 | 7 F5 1.1850 -0.0000 -0.1180 f3 1 SCF -0.674040852 16 | @BOND 17 | 1 1 2 1 18 | 2 1 3 1 19 | 3 1 4 1 20 | 4 1 5 1 21 | 5 1 6 1 22 | 6 1 7 1 23 | @SUBSTRUCTURE 24 | 1 SCF 1 TEMP 0 **** **** 0 ROOT 25 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/PF6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | PF6 3 | 7 6 1 0 0 4 | SMALL 5 | No Charge or Current Charge 6 | 7 | 8 | @ATOM 9 | 1 P8 -0.8490 -0.0000 -0.1180 P 1 PF6 0.940442528 10 | 2 F0 -0.8490 0.0000 -1.7690 f1 1 PF6 -0.323407088 11 | 3 F1 -0.8490 0.0000 1.5330 f1 1 PF6 -0.323407088 12 | 4 F2 -0.8490 1.6510 -0.1180 f2 1 PF6 -0.323407088 13 | 5 F3 -0.8490 -1.6510 -0.1180 f2 1 PF6 -0.323407088 14 | 6 F4 -2.5000 -0.0000 -0.1180 f3 1 PF6 -0.323407088 15 | 7 F5 0.8020 -0.0000 -0.1180 f3 1 PF6 -0.323407088 16 | @BOND 17 | 1 1 2 1 18 | 2 1 3 1 19 | 3 1 4 1 20 | 4 1 5 1 21 | 5 1 6 1 22 | 6 1 7 1 23 | @SUBSTRUCTURE 24 | 1 PF6 1 TEMP 0 **** **** 0 ROOT 25 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/files.py: -------------------------------------------------------------------------------- 1 | class FileParser: 2 | def __init__(self, path:str, filelist:list): 3 | """ 4 | Run Multiwfn charge calculations 5 | 6 | Parameters: 7 | :param str path: path where mol2 files are located 8 | :param list mol2list: list od mol2file names, without the .mol2 extension 9 | 10 | Class variables: 11 | """ 12 | self.filelist = filelist 13 | self.path = path + '/' 14 | self.files = [] 15 | 16 | def readfiles(self, ftype:str): 17 | for name in self.filelist: 18 | tmp = [] 19 | f = open(self.path + ftype.format(name), 'r') 20 | for line in f: 21 | tmp.append(line) 22 | f.close() 23 | self.files.append(tmp) 24 | 25 | def write(self, outfile: str, file: str): 26 | f = open(self.path + outfile, 'w') 27 | for line in file: 28 | f.write(line) 29 | f.close() -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_tleap.in: -------------------------------------------------------------------------------- 1 | source leaprc.protein.ff19SB 2 | source leaprc.gaff 3 | source leaprc.water.opc 4 | addAtomTypes { 5 | { "M1" "Pt" "sp3" } 6 | { "Y1" "N" "sp3" } 7 | { "Y2" "N" "sp3" } 8 | { "Y5" "Cl" "sp3" } 9 | { "Y6" "Cl" "sp3" } 10 | } 11 | PT1 = loadmol2 PT1.mol2 12 | B1 = loadmol2 B1.mol2 13 | C1 = loadmol2 C1.mol2 14 | D1 = loadmol2 D1.mol2 15 | E1 = loadmol2 E1.mol2 16 | loadamberparams B.frcmod 17 | loadamberparams C.frcmod 18 | loadamberparams D.frcmod 19 | loadamberparams E.frcmod 20 | loadamberparams frcmod.ionslm_126_opc 21 | loadamberparams LIG_mcpbpy.frcmod 22 | mol = loadpdb LIG_mcpbpy.pdb 23 | bond mol.1.PT mol.2.N1 24 | bond mol.1.PT mol.3.N5 25 | bond mol.1.PT mol.4.CL8 26 | bond mol.1.PT mol.5.CL9 27 | savepdb mol LIG_dry.pdb 28 | saveamberparm mol LIG_dry.prmtop LIG_dry.inpcrd 29 | solvatebox mol OPCBOX 15.0 30 | addions mol Na+ 0 31 | addions mol Cl- 0 32 | savepdb mol LIG_solv.pdb 33 | saveamberparm mol LIG_solv.prmtop LIG_solv.inpcrd 34 | quit 35 | 36 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/OTF.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | OTF 3 | 8 7 1 0 0 4 | SMALL 5 | RESP Charge 6 | 7 | 8 | @ATOM 9 | 1 C1 -3.8810 1.5030 -0.1170 c3 1 OTF 0.209651 10 | 2 S2 -2.0390 1.5930 0.1880 s6 1 OTF 1.132803 11 | 3 F3 -4.6230 1.9570 0.9430 f 1 OTF -0.147532 12 | 4 F4 -4.3220 0.2270 -0.3600 f 1 OTF -0.147195 13 | 5 F5 -4.2820 2.2470 -1.1980 f 1 OTF -0.147084 14 | 6 O6 -1.7650 2.9950 0.5300 o 1 OTF -0.633673 15 | 7 O7 -1.4100 1.1730 -1.0720 o 1 OTF -0.633512 16 | 8 O8 -1.7780 0.6670 1.2990 o 1 OTF -0.633459 17 | @BOND 18 | 1 1 2 1 19 | 2 1 3 1 20 | 3 1 4 1 21 | 4 1 5 1 22 | 5 2 6 1 23 | 6 2 7 1 24 | 7 2 8 1 25 | @SUBSTRUCTURE 26 | 1 OTF 1 TEMP 0 **** **** 0 ROOT 27 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/pathchecker.py: -------------------------------------------------------------------------------- 1 | from ..utils.colorgen import Color 2 | import os 3 | 4 | 5 | class PATH: 6 | def __init__(self, program: str): 7 | self.status = 1 8 | self.program = program 9 | self.checkpath() 10 | return self.status 11 | 12 | def checkpath(self): 13 | """ 14 | Check if program is available in PATH 15 | 16 | Parameters: 17 | 18 | Class variables: 19 | """ 20 | self.status = 0 21 | self.programpath = '' 22 | systemPATH = os.environ.get('PATH', '').split(os.pathsep) 23 | for el in systemPATH: 24 | if self.program in el or self.program.upper() in el: 25 | print('Found {} in: '.format(self.program) + el) 26 | self.programpath = el + '/{} '.format(self.program) 27 | self.status = 1 28 | break 29 | if self.programpath == '': 30 | print(Color.RED + '{} was not found on your system... is it in your PATH?'.format(self.program) + Color.END) 31 | self.status = 0 32 | return 33 | else: 34 | return 35 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/SCF.frcmod: -------------------------------------------------------------------------------- 1 | REMARK GOES HERE, THIS FILE IS GENERATED BY MCPB.PY 2 | MASS 3 | SC 44.96 Sc ion 4 | f1 19.000 0.320 5 | f2 19.000 0.320 6 | f3 19.000 0.320 7 | 8 | BOND 9 | SC-f1 58.8 2.0334 Created by Seminario method using MCPB.py 10 | SC-f2 58.8 2.0334 Created by Seminario method using MCPB.py 11 | SC-f3 58.8 2.0334 Created by Seminario method using MCPB.py 12 | 13 | ANGL 14 | f1-SC-f1 59.20 180.00 Created by Seminario method using MCPB.py 15 | f1-SC-f2 59.93 90.00 Created by Seminario method using MCPB.py 16 | f1-SC-f3 59.20 90.00 Created by Seminario method using MCPB.py 17 | f2-SC-f2 59.20 180.00 Created by Seminario method using MCPB.py 18 | f2-SC-f3 59.20 90.00 Created by Seminario method using MCPB.py 19 | f3-SC-f3 59.20 180.00 Created by Seminario method using MCPB.py 20 | 21 | DIHE 22 | 23 | IMPR 24 | 25 | NONB 26 | SC 1.6475 0.0190000000 Adopted from atom type Sc3+3 from UFF (Rappe et al. JACS, 114, 10024) 27 | f1 1.7500 0.0610 28 | f2 1.7500 0.0610 29 | f3 1.7500 0.0610 30 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/solvent.py: -------------------------------------------------------------------------------- 1 | from .tleapAdderInterface import TleapAdder 2 | 3 | 4 | class Solvent(TleapAdder): 5 | def __init__(self): 6 | """ 7 | Class to modify the tleap file and manage the different solvents 8 | 9 | Parameters: 10 | 11 | """ 12 | self.solventDict = {'Water': 'WAT', 13 | 'Acetonitrile': 'ACN', 14 | 'Acetone': 'ACT', 15 | 'Benzene': 'BNZ', 16 | 'Cyclohexane': 'CHX', 17 | 'Chloroform': 'CL3', 18 | 'CCl4': 'CL4', 19 | 'CH2Cl2': 'DCM', 20 | 'DMF': 'DMF', 21 | 'DMSO': 'DMS', 22 | 'Ethanol': 'ETL', 23 | 'Hexane': 'HEX', 24 | 'Methanol': 'MTL', 25 | 'Ammonia': 'NH3', 26 | 'Octanol': 'OCT', 27 | 'THF': 'THF', 28 | 'Toluene': 'TOL', 29 | 'custom': 'SLV'} 30 | TleapAdder.__init__(self, '../solvents', self.solventDict, 'solvent') -------------------------------------------------------------------------------- /src/PyConSolv/solvents/ETL.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | ETL 3 | 9 8 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -5.8350 2.8680 -0.0530 c3 1 ETL -0.3206373946 10 | 2 C1 -4.3190 2.9190 -0.0520 c3 1 ETL 0.5106767438 11 | 3 H -6.1910 2.2020 -0.8410 hc 1 ETL 0.0743686904 12 | 4 H1 -6.2540 3.8600 -0.2340 hc 1 ETL 0.0743686904 13 | 5 H2 -6.2090 2.5030 0.9040 hc 1 ETL 0.0743686904 14 | 6 H3 -3.9510 3.2580 -1.0250 h1 1 ETL -0.0428440777 15 | 7 H4 -3.9020 1.9310 0.1360 h1 1 ETL -0.0428440777 16 | 8 O -3.8000 3.7570 0.9870 oh 1 ETL -0.7749213697 17 | 9 H5 -4.1210 4.6530 0.8300 ho 1 ETL 0.4474641047 18 | @BOND 19 | 1 1 2 1 20 | 2 1 3 1 21 | 3 1 4 1 22 | 4 1 5 1 23 | 5 2 6 1 24 | 6 2 7 1 25 | 7 2 8 1 26 | 8 8 9 1 27 | @SUBSTRUCTURE 28 | 1 ETL 1 TEMP 0 **** **** 0 ROOT 29 | -------------------------------------------------------------------------------- /tests/TestReference/simulation/mdinfo: -------------------------------------------------------------------------------- 1 | 2 | NSTEP = 1422000 TIME(PS) = 1472.000 TEMP(K) = 297.75 PRESS = 51.0 3 | Etot = -16567.6269 EKtot = 2777.0344 EPtot = -19344.6614 4 | BOND = 2.6059 ANGLE = 2.5517 DIHED = 0.0000 5 | 1-4 NB = -0.1478 1-4 EEL = -213.0973 VDWAALS = 2827.0997 6 | EELEC = -21963.6737 EHBOND = 0.0000 RESTRAINT = 0.0000 7 | EKCMT = 1378.2143 VIRIAL = 1326.6741 VOLUME = 46845.4051 8 | Density = 1.0069 9 | ------------------------------------------------------------------------------ 10 | | Current Timing Info 11 | | ------------------- 12 | | Total steps: 100000000 | Completed: 1422000 ( 1.4%) | Remaining: 98578000 13 | | 14 | | Average timings for last 70000 steps: 15 | | Elapsed(s) = 59.65 Per Step(ms) = 0.85 16 | | ns/day = 101.39 seconds/ns = 852.14 17 | | 18 | | Average timings for all steps: 19 | | Elapsed(s) = 1140.45 Per Step(ms) = 0.80 20 | | ns/day = 107.73 seconds/ns = 802.01 21 | | 22 | | 23 | | Estimated time remaining: 22.0 hours. 24 | ------------------------------------------------------------------------------ 25 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["hatchling", "hatch-requirements-txt"] 3 | build-backend = "hatchling.build" 4 | 5 | [project] 6 | name = "PyConSolv" 7 | version = "1.0.6.3.1" 8 | dynamic = ["dependencies"] 9 | authors = [ 10 | { name="R. A. Talmazan", email="radu.talmazan@tuwien.ac.at" }, 11 | ] 12 | description = "A package for conformer generation of transition-metal-containing complexes" 13 | readme = "README.md" 14 | requires-python = ">=3.10" 15 | classifiers = [ 16 | "Programming Language :: Python :: 3", 17 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", 18 | "Operating System :: Unix", 19 | "Natural Language :: English", 20 | "Intended Audience :: Science/Research", 21 | "Topic :: Scientific/Engineering :: Chemistry" 22 | ] 23 | 24 | keywords = [ 25 | "Conformer", 26 | "PyConSolv", 27 | "Transition metals", 28 | "MCPB", 29 | "AmberTools", 30 | "Simulation", 31 | "ORCA", 32 | "Generator", 33 | "Solvation", 34 | "Explicit Solvent", 35 | "Parametrization", 36 | ] 37 | 38 | [tool.hatch.metadata.hooks.requirements_txt] 39 | files = ["requirements.txt"] 40 | 41 | [project.scripts] 42 | pyconsolv = "PyConSolv.pyconsolv:main" 43 | 44 | [project.urls] 45 | "Homepage" = "https://github.com/PodewitzLab/PyConSolv" 46 | "Bug Tracker" = "https://github.com/PodewitzLab/PyConSolv/issues" 47 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/ACT.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | ACT 3 | 10 9 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -7.5830 -1.8170 0.0420 c3 1 ACT -0.5167106291 10 | 2 C1 -6.0960 -1.8150 0.2810 c 1 ACT 0.8156595385 11 | 3 H -8.0430 -1.0010 0.6030 hc 1 ACT 0.1456335468 12 | 4 H1 -8.0200 -2.7450 0.4140 hc 1 ACT 0.1456335468 13 | 5 H2 -7.7980 -1.7030 -1.0170 hc 1 ACT 0.1456335468 14 | 6 C2 -5.6420 -2.0500 1.6970 c3 1 ACT -0.5125902274 15 | 7 H3 -6.1090 -1.3250 2.3650 hc 1 ACT 0.1445967762 16 | 8 H4 -4.5600 -1.9830 1.7670 hc 1 ACT 0.1445967762 17 | 9 H5 -5.9720 -3.0390 2.0220 hc 1 ACT 0.1445967762 18 | 10 O -5.3010 -1.6290 -0.6260 o 1 ACT -0.6570496510 19 | @BOND 20 | 1 1 2 1 21 | 2 1 3 1 22 | 3 1 4 1 23 | 4 1 5 1 24 | 5 2 6 1 25 | 6 2 10 2 26 | 7 6 7 1 27 | 8 6 8 1 28 | 9 6 9 1 29 | @SUBSTRUCTURE 30 | 1 ACT 1 TEMP 0 **** **** 0 ROOT 31 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/DMS.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | DMS 3 | 10 9 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 S -6.2580 -4.6400 -0.0380 s4 1 DMS 0.3254623397 10 | 2 C -5.5940 -2.9800 0.1720 c3 1 DMS -0.3786438895 11 | 3 C1 -5.3460 -5.4160 1.3060 c3 1 DMS -0.3752229140 12 | 4 H -5.5870 -6.4770 1.2810 h1 1 DMS 0.1665943240 13 | 5 H1 -5.6700 -4.9830 2.2520 h1 1 DMS 0.1665943240 14 | 6 H2 -4.2800 -5.2620 1.1480 h1 1 DMS 0.1665943240 15 | 7 H3 -6.0070 -2.3690 -0.6280 h1 1 DMS 0.1674727475 16 | 8 H4 -4.5080 -3.0200 0.1020 h1 1 DMS 0.1674727475 17 | 9 H5 -5.9120 -2.5910 1.1390 h1 1 DMS 0.1674727475 18 | 10 O -5.6770 -5.1780 -1.3180 o 1 DMS -0.5737967505 19 | @BOND 20 | 1 1 2 1 21 | 2 1 3 1 22 | 3 1 10 2 23 | 4 2 7 1 24 | 5 2 8 1 25 | 6 2 9 1 26 | 7 3 4 1 27 | 8 3 5 1 28 | 9 3 6 1 29 | @SUBSTRUCTURE 30 | 1 DMS 1 TEMP 0 **** **** 0 ROOT 31 | -------------------------------------------------------------------------------- /src/PyConSolv/interfaces/parmed.py: -------------------------------------------------------------------------------- 1 | import os 2 | import parmed as pmd 3 | import shutil 4 | 5 | class Parmed(): 6 | 7 | def __init__(self, path: str): 8 | ''' 9 | Class to interface to parmed for various functions 10 | 11 | :param path: location of files which should be processed 12 | ''' 13 | self.path = path 14 | self.original_dir = os.getcwd() 15 | 16 | def checkTop(self, name: str ='LIG_solv'): 17 | ''' 18 | Function to check topology and input coordinates after generating the files with tleap. It is known that 19 | sometimes tleap does not generate fully correct geometries and topologies when multiple molecules are involved. 20 | :param string name: name of the files that should be checked, generally LIG_solv and LIG_dry 21 | :return: 22 | ''' 23 | os.chdir(self.path) 24 | a = pmd.load_file('{}.prmtop'.format(name), xyz='{}.inpcrd'.format(name)) 25 | a.rediscover_molecules(True) 26 | a.remake_parm() 27 | a.load_pointers() 28 | a.save('{}_checked.prmtop'.format(name)) 29 | a.save('{}_checked.inpcrd'.format(name)) 30 | a.save('{}_checked.pdb'.format(name)) 31 | shutil.move('{}_checked.prmtop'.format(name),'{}.prmtop'.format(name)) 32 | shutil.move('{}_checked.inpcrd'.format(name), '{}.inpcrd'.format(name)) 33 | shutil.move('{}_checked.pdb'.format(name), '{}.pdb'.format(name)) -------------------------------------------------------------------------------- /src/PyConSolv/solvents/PYR.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | PYR 3 | 11 11 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 N 4.6970 -4.6660 -5.5140 nb 1 PYR -0.7535521394 10 | 2 C 4.5420 -4.1120 -4.3050 ca 1 PYR 0.5132906922 11 | 3 H 4.4910 -4.7980 -3.4670 h4 1 PYR 0.0186545037 12 | 4 C1 4.4460 -2.7410 -4.0940 ca 1 PYR -0.5382874668 13 | 5 C2 4.5150 -1.8930 -5.1930 ca 1 PYR 0.2685592442 14 | 6 H1 4.3220 -2.3550 -3.0920 ha 1 PYR 0.2040802969 15 | 7 H2 4.4450 -0.8200 -5.0690 ha 1 PYR 0.0896705602 16 | 8 C3 4.6760 -2.4530 -6.4560 ca 1 PYR -0.5348940697 17 | 9 C4 4.7610 -3.8370 -6.5630 ca 1 PYR 0.5100395268 18 | 10 H3 4.7350 -1.8360 -7.3420 ha 1 PYR 0.2032085350 19 | 11 H4 4.8870 -4.3020 -7.5340 h4 1 PYR 0.0192303170 20 | @BOND 21 | 1 1 2 ar 22 | 2 1 9 ar 23 | 3 2 3 1 24 | 4 2 4 ar 25 | 5 4 5 ar 26 | 6 4 6 1 27 | 7 5 7 1 28 | 8 5 8 ar 29 | 9 8 9 ar 30 | 10 8 10 1 31 | 11 9 11 1 32 | @SUBSTRUCTURE 33 | 1 PYR 1 TEMP 0 **** **** 0 ROOT 34 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/DMF.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | DMF 3 | 12 11 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -5.5360 -5.1340 -1.1970 c 1 DMF 0.3522812722 10 | 2 H -5.4860 -6.2300 -1.1370 h5 1 DMF 0.0770914305 11 | 3 O -5.7060 -4.5530 -2.2680 o 1 DMF -0.6368709504 12 | 4 N -5.3930 -4.5480 0.0050 n 1 DMF 0.0808042700 13 | 5 C1 -5.4300 -3.1040 0.1510 c3 1 DMF -0.1292302995 14 | 6 C2 -5.2000 -5.3320 1.2100 c3 1 DMF -0.4962301704 15 | 7 H1 -5.1950 -6.3910 0.9600 h1 1 DMF 0.1692366593 16 | 8 H2 -6.0040 -5.1400 1.9220 h1 1 DMF 0.1692366593 17 | 9 H3 -4.2500 -5.0750 1.6820 h1 1 DMF 0.1692366593 18 | 10 H4 -5.5830 -2.6550 -0.8250 h1 1 DMF 0.0814814898 19 | 11 H5 -4.4900 -2.7460 0.5750 h1 1 DMF 0.0814814898 20 | 12 H6 -6.2440 -2.8160 0.8190 h1 1 DMF 0.0814814898 21 | @BOND 22 | 1 1 2 1 23 | 2 1 3 2 24 | 3 1 4 1 25 | 4 4 5 1 26 | 5 4 6 1 27 | 6 5 10 1 28 | 7 5 11 1 29 | 8 5 12 1 30 | 9 6 7 1 31 | 10 6 8 1 32 | 11 6 9 1 33 | @SUBSTRUCTURE 34 | 1 DMF 1 TEMP 0 **** **** 0 ROOT 35 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/BNZ.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | BNZ 3 | 12 12 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -7.9950 -1.8540 -1.9270 ca 1 BNZ -0.1331770857 10 | 2 C1 -6.6090 -1.7970 -2.0630 ca 1 BNZ -0.1360915084 11 | 3 C2 -5.8210 -1.3720 -0.9960 ca 1 BNZ -0.1315539162 12 | 4 H -6.1450 -2.0830 -2.9980 ha 1 BNZ 0.1341448011 13 | 5 C3 -6.4190 -1.0030 0.2080 ca 1 BNZ -0.1322271256 14 | 6 H1 -4.7450 -1.3270 -1.1020 ha 1 BNZ 0.1328410906 15 | 7 C4 -7.8040 -1.0590 0.3440 ca 1 BNZ -0.1355547449 16 | 8 H2 -5.8070 -0.6720 1.0370 ha 1 BNZ 0.1328243600 17 | 9 H3 -8.2680 -0.7720 1.2780 ha 1 BNZ 0.1337486505 18 | 10 C5 -8.5920 -1.4850 -0.7240 ca 1 BNZ -0.1307180282 19 | 11 H4 -9.6690 -1.5280 -0.6180 ha 1 BNZ 0.1323958894 20 | 12 H5 -8.6070 -2.1840 -2.7560 ha 1 BNZ 0.1333676173 21 | @BOND 22 | 1 1 2 ar 23 | 2 1 10 ar 24 | 3 1 12 1 25 | 4 2 3 ar 26 | 5 2 4 1 27 | 6 3 5 ar 28 | 7 3 6 1 29 | 8 5 7 ar 30 | 9 5 8 1 31 | 10 7 9 1 32 | 11 7 10 ar 33 | 12 10 11 1 34 | @SUBSTRUCTURE 35 | 1 UNL 1 TEMP 0 **** **** 0 ROOT 36 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt.engrad: -------------------------------------------------------------------------------- 1 | # 2 | # Number of atoms 3 | # 4 | 11 5 | # 6 | # The current total energy in Eh 7 | # 8 | -1152.930725460712 9 | # 10 | # The current gradient in Eh/bohr 11 | # 12 | -0.000003732337 13 | -0.000036051525 14 | 0.000046789658 15 | 0.000059435425 16 | 0.000016184338 17 | 0.000006673445 18 | 0.000012512081 19 | 0.000001610249 20 | -0.000022120351 21 | -0.000005805863 22 | 0.000020841120 23 | -0.000016915151 24 | -0.000053659815 25 | -0.000018910854 26 | -0.000018255593 27 | 0.000005333501 28 | 0.000068041893 29 | -0.000041312560 30 | 0.000017510415 31 | 0.000001388397 32 | 0.000011657188 33 | -0.000018825076 34 | -0.000060655759 35 | 0.000044640840 36 | 0.000000775640 37 | 0.000020249727 38 | 0.000009304551 39 | 0.000017839575 40 | 0.000011932358 41 | -0.000010019566 42 | -0.000031383515 43 | -0.000024629936 44 | -0.000010442445 45 | # 46 | # The atomic numbers and current coordinates in Bohr 47 | # 48 | 78 -5.4425939 0.2591089 0.3393609 49 | 7 -1.7063406 1.2142240 0.9963777 50 | 1 -1.4986428 2.9451693 1.8722102 51 | 1 -0.6344489 1.2655054 -0.6330273 52 | 1 -0.9052649 -0.1268120 2.1707261 53 | 7 -6.0075222 3.4010117 -1.9209786 54 | 1 -5.7258285 5.0829882 -0.9733588 55 | 1 -7.8535411 3.4011288 -2.5623181 56 | 1 -4.8505732 3.4306180 -3.4914843 57 | 17 -4.7143815 -3.2814868 2.9224215 58 | 17 -9.6916966 -0.7539958 -0.4660362 59 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/restart.py: -------------------------------------------------------------------------------- 1 | class RestartFile: 2 | def __init__(self, path: str): 3 | """ 4 | Class for checking restart files and returning the last known state 5 | 6 | Parameters: 7 | :param string path: path to restart file (pyconsolv.restart) 8 | 9 | Class variables: 10 | - self.restart: path to restart file 11 | - self.state: calculation state, based on the restart file 12 | """ 13 | self.restart = path + '/pyconsolv.restart' 14 | self.state = 0 15 | 16 | def getstate(self) -> int: 17 | f = open(self.restart, 'r') 18 | for line in f: 19 | match line.split()[0]: 20 | case 'setup': 21 | self.state = 1 22 | case 'orca': 23 | self.state = 2 24 | case 'antechamber': 25 | self.state = 3 26 | case 'frcmod': 27 | self.state = 4 28 | case 'multiwfn': 29 | self.state = 5 30 | case 'mcpb': 31 | self.state = 6 32 | case 'tleap': 33 | self.state = 7 34 | case 'equilibration': 35 | self.state = 8 36 | case 'DONE': 37 | self.state = 9 38 | case other: 39 | self.state = 0 40 | 41 | f.close() 42 | return self.state 43 | 44 | def write(self, state: str): 45 | f = open(self.restart, 'w') 46 | f.write(state) 47 | f.close() 48 | 49 | def parseInput(self): 50 | pass 51 | 52 | def writeInput(self): 53 | pass -------------------------------------------------------------------------------- /src/PyConSolv/solvents/THF.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | THF 3 | 13 13 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C1 -3.4850 1.2710 -0.1900 c3 1 THF 0.0161052548 10 | 2 C2 -1.9620 1.2390 -0.0540 c3 1 THF 0.0199890666 11 | 3 H3 -3.9320 1.7640 0.6750 hc 1 THF 0.0003841173 12 | 4 C4 -3.8230 -0.2150 -0.1880 c3 1 THF 0.2558109888 13 | 5 H5 -3.8300 1.7740 -1.0920 hc 1 THF 0.0003841173 14 | 6 C6 -1.7630 0.0770 0.9100 c3 1 THF 0.2534880112 15 | 7 H7 -1.5410 2.1700 0.3250 hc 1 THF -0.0004814479 16 | 8 H8 -1.5010 1.0170 -1.0180 hc 1 THF -0.0004814479 17 | 9 O9 -2.8370 -0.8470 0.6490 os 1 THF -0.5163566888 18 | 10 H10 -3.7580 -0.6340 -1.1970 h1 1 THF -0.0074196500 19 | 11 H11 -4.8110 -0.4340 0.2180 h1 1 THF -0.0074196500 20 | 12 H12 -1.8270 0.4120 1.9500 h1 1 THF -0.0070013357 21 | 13 H13 -0.8170 -0.4460 0.7690 h1 1 THF -0.0070013357 22 | @BOND 23 | 1 1 2 1 24 | 2 1 3 1 25 | 3 1 4 1 26 | 4 1 5 1 27 | 5 2 6 1 28 | 6 2 7 1 29 | 7 2 8 1 30 | 8 4 9 1 31 | 9 4 10 1 32 | 10 4 11 1 33 | 11 6 9 1 34 | 12 6 12 1 35 | 13 6 13 1 36 | @SUBSTRUCTURE 37 | 1 THF 1 TEMP 0 **** **** 0 ROOT 38 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_mcpbpy_pre.frcmod: -------------------------------------------------------------------------------- 1 | REMARK GOES HERE, THIS FILE IS GENERATED BY MCPB.PY 2 | MASS 3 | YES M1 195.08 Pt ion 4 | YES Y1 14.01 0.530 Sp3 N with three connected atoms 5 | YES Y2 14.01 0.530 Sp3 N with three connected atoms 6 | YES Y5 35.450 1.910 same as cl 7 | YES Y6 35.450 1.910 same as cl 8 | 9 | BOND 10 | NON M1-Y1 11 | NON M1-Y2 12 | NON M1-Y5 13 | NON M1-Y6 14 | YES Y1-hn 392.4 1.0190 SOURCE3_SOURCE5 5944 0.0012 15 | YES Y2-hn 392.4 1.0190 SOURCE3_SOURCE5 5944 0.0012 16 | 17 | ANGL 18 | NON M1-Y1-hn 19 | NON M1-Y2-hn 20 | NON Y2-M1-Y1 21 | NON Y5-M1-Y1 22 | NON Y5-M1-Y2 23 | NON Y5-M1-Y5 24 | NON Y6-M1-Y1 25 | NON Y6-M1-Y2 26 | NON Y6-M1-Y5 27 | NON Y6-M1-Y6 28 | YES hn-Y1-hn 41.4 106.40 SOURCE3_SOURCE5 2019 0.9777 29 | YES hn-Y2-hn 41.4 106.40 SOURCE3_SOURCE5 2019 0.9777 30 | 31 | DIHE 32 | YES Y2-M1-Y1-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 33 | YES Y5-M1-Y1-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 34 | YES Y5-M1-Y2-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 35 | YES Y6-M1-Y1-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 36 | YES Y6-M1-Y2-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 37 | YES hn-Y2-M1-Y1 3 0.00 0.00 3.0 Treat as zero by MCPB.py 38 | 39 | IMPR 40 | 41 | NONB 42 | YES M1 1.2190 0.0015090300 CM set for Pt2+ ion in OPC water from Li et al. JCTC, 2020, 16, 4429 43 | YES Y1 1.8240 0.1700 OPLS 44 | YES Y2 1.8240 0.1700 OPLS 45 | YES Y5 1.9480 0.2650 same as cl 46 | YES Y6 1.9480 0.2650 same as cl 47 | 48 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/TOL.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | TOL 3 | 15 15 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -6.6220 0.5970 -0.0430 ca 1 TOL -0.1035900868 10 | 2 C1 -5.3250 0.4210 -0.5180 ca 1 TOL -0.1921941779 11 | 3 C2 -4.3260 1.3090 -0.1260 ca 1 TOL -0.1018265219 12 | 4 H -5.0960 -0.3970 -1.1890 ha 1 TOL 0.1437571543 13 | 5 H1 -3.3150 1.1850 -0.4930 ha 1 TOL 0.1372511387 14 | 6 C3 -4.6240 2.3620 0.7350 ca 1 TOL -0.3159126295 15 | 7 C4 -5.9210 2.5480 1.2230 ca 1 TOL 0.3374294485 16 | 8 H2 -3.8410 3.0500 1.0310 ha 1 TOL 0.1723530172 17 | 9 C5 -6.9140 1.6520 0.8180 ca 1 TOL -0.3161278459 18 | 10 C6 -6.2310 3.6690 2.1780 c3 1 TOL -0.4167448698 19 | 11 H3 -7.9270 1.7840 1.1790 ha 1 TOL 0.1708747103 20 | 12 H4 -7.4070 -0.0840 -0.3450 ha 1 TOL 0.1383713242 21 | 13 H5 -5.6500 4.5600 1.9430 hc 1 TOL 0.1154531129 22 | 14 H6 -5.9890 3.3820 3.2040 hc 1 TOL 0.1154531129 23 | 15 H7 -7.2890 3.9290 2.1500 hc 1 TOL 0.1154531129 24 | @BOND 25 | 1 1 2 ar 26 | 2 1 9 ar 27 | 3 1 12 1 28 | 4 2 3 ar 29 | 5 2 4 1 30 | 6 3 5 1 31 | 7 3 6 ar 32 | 8 6 7 ar 33 | 9 6 8 1 34 | 10 7 9 ar 35 | 11 7 10 1 36 | 12 9 11 1 37 | 13 10 13 1 38 | 14 10 14 1 39 | 15 10 15 1 40 | @SUBSTRUCTURE 41 | 1 TOL 1 TEMP 0 **** **** 0 ROOT 42 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/coordinateCheck.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | class XYZMapper: 5 | 6 | def __init__(self, filepath): 7 | ''' 8 | This class will compare 2 XYZ files and return a dictionary which will aid in mapping 2 different structure orders 9 | 10 | :param filepath str - path to the reference XYZ file: 11 | 12 | class variables: 13 | 14 | - self.xyz = reference xyz coordinates, saved as a [N,3] numpy array 15 | - self.map = dictionary for mapping atomd ids 16 | ''' 17 | self.xyz = self.readXYZ(filepath) 18 | self.map = {} 19 | for i in range(self.xyz.shape[0]): 20 | self.map[i+1] = 9999 21 | 22 | def mapXYZ(self, filepath): 23 | ''' 24 | 25 | :param filepath: path to the XYZ file to compare to the reference 26 | :return: 27 | ''' 28 | newXYZ = self.readXYZ(filepath) 29 | for i in range(newXYZ.shape[0]): 30 | diff = 9999 31 | match = 9999 32 | for j in range(self.xyz.shape[0]): 33 | if abs(np.linalg.norm(self.xyz[i] - newXYZ[j])) <= diff: 34 | diff = abs(np.linalg.norm(self.xyz[i] - newXYZ[j])) 35 | match = j 36 | self.map[i+1] = match+1 37 | 38 | 39 | 40 | def readXYZ(self, file) -> np.array: 41 | ''' 42 | 43 | :param file str: path to the XYZ file to read 44 | :return: [N,3] numpy array with coordinates 45 | ''' 46 | return np.loadtxt(file, skiprows=2, dtype=object)[:,1:].astype(float) 47 | 48 | def mapAtom(self, id: int) -> int: 49 | ''' 50 | 51 | :param id int: id of the atom in the target XYZ file 52 | :return: 53 | ''' 54 | for key, value in self.map.items(): 55 | if id == value: 56 | return (key) 57 | 58 | def mapReference(self, id: int) -> int: 59 | ''' 60 | 61 | :param id int: id of the atom in the reference 62 | :return: 63 | ''' 64 | return self.map[id] 65 | 66 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/mol2.py: -------------------------------------------------------------------------------- 1 | from .files import FileParser 2 | 3 | 4 | class mol2Parser(FileParser): 5 | 6 | def joinMol2(self): 7 | template = '''@MOLECULE 8 | A 9 | {} {} 1 0 0 10 | SMALL 11 | bcc 12 | 13 | 14 | @ATOM 15 | {} 16 | @BOND 17 | {} 18 | @SUBSTRUCTURE 19 | 1 A 1 TEMP 0 **** **** 0 ROOT 20 | ''' 21 | atoms = [] 22 | connect = [] 23 | atomsperfile = [0] 24 | for file in self.files: 25 | flag = 0 26 | for line in file: 27 | if '@ATOM' in line: 28 | flag = 1 29 | continue 30 | if '@BOND' in line: 31 | flag = 2 32 | continue 33 | if '@SUBSTRUCTURE' in line: 34 | break 35 | if flag == 1 : 36 | atoms.append(line.split()) 37 | if flag == 2 : 38 | connect.append(line.split()) 39 | atomsperfile.append(len(atoms)) 40 | 41 | atomstring = '' 42 | connectionstring = '' 43 | 44 | for i in range(len(atoms)): 45 | atoms[i][0] = str(i+1) 46 | atomstring = atomstring + ' '.join(atoms[i]) + '\n' 47 | 48 | counter = 0 49 | for i in range(len(connect)): 50 | if i > 0: 51 | if (atomsperfile[counter] + int(connect[i][0]))< int(connect[i-1][0]) : 52 | counter += 1 53 | connect[i][0] = str(i+1) 54 | connect[i][1] = str(int(connect[i][1]) + atomsperfile[counter]) 55 | connect[i][2] = str(int(connect[i][2]) + atomsperfile[counter]) 56 | connectionstring = connectionstring + ' '.join(connect[i]) + '\n' 57 | 58 | return template.format(len(atoms), len(connect), atomstring, connectionstring) 59 | 60 | 61 | def writeCombinedMol2(self): 62 | self.readfiles('{}.mol2') 63 | mol2string = self.joinMol2() 64 | self.write('LIG.mol2', mol2string) 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from os import path 5 | from setuptools import setup, find_packages 6 | import sys 7 | 8 | min_version = (3, 10) 9 | if sys.version_info < min_version: 10 | error = """ 11 | PyConSolv does not support Python {0}.{1}. 12 | Python {2}.{3} and above is required. Check your Python version like so: 13 | python3 --version 14 | This may be due to an out-of-date pip. Make sure you have pip >= 9.0.1. 15 | Upgrade pip like so: 16 | pip install --upgrade pip 17 | """.format(*(sys.version_info[:2] + min_version)) 18 | sys.exit(error) 19 | 20 | here = path.dirname(path.realpath(__file__)) 21 | 22 | with open(path.join(here, 'README.md'), encoding='utf-8') as readme_file: 23 | readme = readme_file.read() 24 | 25 | with open(path.join(here, 'requirements.txt')) as requirements_file: 26 | requirements = [line for line in requirements_file.read().splitlines() 27 | if not line.startswith('#')] 28 | setup( 29 | name="PyConSolv", 30 | version="1.0.6.3", 31 | description="A package for conformer generation of transition-metal-containing complexes", 32 | long_description=readme, 33 | author="Radu Alexandru Talmazan", 34 | author_email="radu.talmazan@tuwien.ac.at", 35 | python_requires='>={}'.format('.'.join(str(n) for n in min_version)), 36 | install_requires=requirements, 37 | zip_safe=False, 38 | license="GPLv3", 39 | classifiers=[ 40 | "Programming Language :: Python :: 3", 41 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", 42 | "Operating System :: Unix", 43 | "Natural Language :: English", 44 | "Intended Audience :: Science/Research", 45 | "Topic :: Scientific/Engineering :: Chemistry" 46 | ], 47 | packages=['PyConSolv', 48 | 'PyConSolv.interfaces', 49 | 'PyConSolv.misc', 50 | 'PyConSolv.utils'], 51 | package_data={ 52 | 'PyConSolv': [ 53 | 'Manual/*' 54 | ] 55 | }, 56 | py_modules=[ 57 | "PyConSolv.interfaces", 58 | "PyConSolv.misc", 59 | "PyConSolv.utils", 60 | ], 61 | entry_points={ 62 | 'console_scripts': [ 63 | 'pyconsolv = PyConSolv.pyconsolv:main', 64 | ], 65 | }, 66 | ) -------------------------------------------------------------------------------- /tests/test_amber.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | import unittest 4 | import filecmp 5 | from ..src.PyConSolv.interfaces.amber import amberInterface 6 | 7 | 8 | class TestSetup(unittest.TestCase): 9 | def setUp(self): 10 | self.testRefPath = os.path.split(__file__)[0] + '/TestReference/' 11 | self.testFilePath = os.path.split(__file__)[0] + '/Testfiles/' 12 | db_file = os.path.split(__file__)[0] + '/../src/PyConSolv/db/atom-radius.txt' 13 | db_metal_file = os.path.split(__file__)[0] + '/../src/PyConSolv/db/metal-radius.txt' 14 | # run functions of inputparser 15 | self.amber = amberInterface(self.testFilePath) 16 | self.metalbonds_ref = ['0-1 @N1', '0-5 @N5', '0-9 @Cl9', '0-10 @Cl10'] 17 | self.connections_ref = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] 18 | 19 | def test_inputFileGenerator(self): 20 | metals = 'PT' 21 | ligands = ['B','C','D','E'] 22 | self.amber.inputFileGenerator(metals,ligands) 23 | result = filecmp.cmp(self.testFilePath + 'input.in', 24 | self.testRefPath + '/MCPB_setup/input_reduced.in') 25 | os.remove(self.testFilePath + 'input.in') 26 | self.assertTrue(result) 27 | 28 | def test_readMetalBonds(self): 29 | metalbonds = self.amber.readMetalBonds(self.testRefPath + '/MCPB_setup/') 30 | self.assertListEqual(self.metalbonds_ref, metalbonds, 'Metalbonds should be the same') 31 | 32 | def test_readConnections(self): 33 | connections = self.amber.readConnections(self.testRefPath + '/MCPB_setup/') 34 | self.assertListEqual(self.connections_ref, connections, 'Connections should be the same') 35 | 36 | def test_checkMCPBBonds(self): 37 | shutil.copytree(self.testRefPath + '/MCPB_setup/', self.testFilePath + '/MCPB_setup/') 38 | shutil.copyfile(self.testRefPath + '/MCPB_setup/input_reduced.in', self.testFilePath + '/MCPB_setup/input.in') 39 | result = self.amber.checkMCPBBonds(self.testFilePath + '/MCPB_setup/') 40 | result = filecmp.cmp(self.testFilePath + '/MCPB_setup/input.in',self.testRefPath + '/MCPB_setup/input.in') 41 | shutil.rmtree(self.testFilePath + '/MCPB_setup/') 42 | self.assertTrue(result) 43 | 44 | if __name__ == '__main__': 45 | unittest.main() -------------------------------------------------------------------------------- /src/PyConSolv/utils/charge.py: -------------------------------------------------------------------------------- 1 | class ChargeChanger: 2 | def __init__(self): 3 | self.iterator = 0 4 | 5 | def change(self, filein, fileout, resname, charges, fragmented = False, mapfile = None): 6 | print(filein) 7 | fin = open(filein, 'r') # read mol2 files corresponding to the pdb 8 | fout = open(fileout, 'w') # create new mol2 file 9 | switch = 0 10 | for line in fin: 11 | if 'USER_CHARGES' in line: 12 | fout.write('RESP Charge\n') 13 | elif '@ATOM' in line: 14 | switch = 1 15 | fout.write(line) 16 | elif '@BOND' in line: 17 | fout.write(line) 18 | switch = 2 19 | elif '@SUBSTRUCTURE' in line: 20 | fout.write(line) 21 | switch = 3 22 | elif '@MOLECULE' in line: 23 | fout.write(line) 24 | switch = 4 25 | else: 26 | if switch == 1: 27 | 28 | tmp_line = line.split()[:-1] # remove old charge 29 | # if fragmented: 30 | tmp_line.append(float(charges[self.iterator][-1])) # add resp charge 31 | # else: 32 | # tmp_line.append(float(charges[self.iterator])) # add resp charge 33 | tmp_line[-2] = resname 34 | if mapfile is not None: 35 | tmp_line[5] = mapfile[self.iterator][-1] 36 | fout.write( 37 | '{:>7} {:<7} {:>7} {:>7} {:>7} {:<2} {} {:>2} {:>9.6f}\n'.format(*tmp_line)) 38 | self.iterator += 1 39 | elif switch == 3: 40 | fout.write(' 1 {} 1 TEMP 0 **** **** 0 ROOT\n'.format(resname)) 41 | switch = 0 42 | elif switch == 4: 43 | fout.write(resname + '\n') 44 | switch = 0 45 | else: 46 | if 'bcc' in line: 47 | fout.write(line.replace('bcc', 'RESP Charge')) 48 | else: 49 | fout.write(line.replace('ar', '1')) 50 | fout.close() 51 | fin.close() -------------------------------------------------------------------------------- /src/PyConSolv/solvents/CHX.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | CHX 3 | 18 18 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C -7.2970 -1.9910 -1.7730 c3 1 CHX 0.0553389899 10 | 2 C1 -6.0150 -1.1730 -1.9290 c3 1 CHX 0.0567421609 11 | 3 H -6.1980 -0.1500 -1.5820 hc 1 CHX -0.0281809003 12 | 4 H1 -5.7370 -1.1020 -2.9840 hc 1 CHX -0.0281809003 13 | 5 C2 -4.8660 -1.7770 -1.1190 c3 1 CHX 0.0556358400 14 | 6 C3 -5.2480 -1.9380 0.3540 c3 1 CHX 0.0557503908 15 | 7 H2 -3.9710 -1.1570 -1.2110 hc 1 CHX -0.0280201389 16 | 8 H3 -4.6140 -2.7590 -1.5330 hc 1 CHX -0.0280201389 17 | 9 H4 -5.4000 -0.9470 0.7950 hc 1 CHX -0.0279114200 18 | 10 H5 -4.4310 -2.4070 0.9070 hc 1 CHX -0.0279114200 19 | 11 C4 -6.5310 -2.7570 0.5100 c3 1 CHX 0.0581631313 20 | 12 C5 -7.6800 -2.1520 -0.3010 c3 1 CHX 0.0557575329 21 | 13 H6 -6.8090 -2.8270 1.5640 hc 1 CHX -0.0287193618 22 | 14 H7 -6.3480 -3.7790 0.1630 hc 1 CHX -0.0287193618 23 | 15 H8 -7.9320 -1.1700 0.1130 hc 1 CHX -0.0280715707 24 | 16 H9 -8.5750 -2.7730 -0.2080 hc 1 CHX -0.0280715707 25 | 17 H10 -7.1460 -2.9830 -2.2150 hc 1 CHX -0.0277906312 26 | 18 H11 -8.1150 -1.5220 -2.3270 hc 1 CHX -0.0277906312 27 | @BOND 28 | 1 1 2 1 29 | 2 1 12 1 30 | 3 1 17 1 31 | 4 1 18 1 32 | 5 2 3 1 33 | 6 2 4 1 34 | 7 2 5 1 35 | 8 5 6 1 36 | 9 5 7 1 37 | 10 5 8 1 38 | 11 6 9 1 39 | 12 6 10 1 40 | 13 6 11 1 41 | 14 11 12 1 42 | 15 11 13 1 43 | 16 11 14 1 44 | 17 12 15 1 45 | 18 12 16 1 46 | @SUBSTRUCTURE 47 | 1 CHX 1 TEMP 0 **** **** 0 ROOT 48 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/LIG_mcpbpy.frcmod: -------------------------------------------------------------------------------- 1 | REMARK GOES HERE, THIS FILE IS GENERATED BY MCPB.PY 2 | MASS 3 | M1 195.08 Pt ion 4 | Y1 14.01 0.530 Sp3 N with three connected atoms 5 | Y2 14.01 0.530 Sp3 N with three connected atoms 6 | Y5 35.450 1.910 same as cl 7 | Y6 35.450 1.910 same as cl 8 | 9 | BOND 10 | M1-Y1 107.7 2.0701 Created by Seminario method using MCPB.py 11 | M1-Y2 107.9 2.0699 Created by Seminario method using MCPB.py 12 | M1-Y5 101.3 2.351 Created by Seminario method using MCPB.py 13 | M1-Y6 57.2 2.3505 Created by Seminario method using MCPB.py 14 | Y1-hn 392.4 1.0190 SOURCE3_SOURCE5 5944 0.0012 15 | Y2-hn 392.4 1.0190 SOURCE3_SOURCE5 5944 0.0012 16 | 17 | ANGL 18 | M1-Y1-hn 46.18 111.72 Created by Seminario method using MCPB.py 19 | M1-Y2-hn 46.19 111.70 Created by Seminario method using MCPB.py 20 | Y2-M1-Y1 118.57 92.23 Created by Seminario method using MCPB.py 21 | Y5-M1-Y1 97.43 86.58 Created by Seminario method using MCPB.py 22 | Y5-M1-Y2 100.09 178.81 Created by Seminario method using MCPB.py 23 | Y6-M1-Y1 243.53 178.8 Created by Seminario method using MCPB.py 24 | Y6-M1-Y2 212.79 86.58 Created by Seminario method using MCPB.py 25 | Y6-M1-Y5 147.70 94.61 Created by Seminario method using MCPB.py 26 | hn-Y1-hn 41.4 106.40 SOURCE3_SOURCE5 2019 0.9777 27 | hn-Y2-hn 41.4 106.40 SOURCE3_SOURCE5 2019 0.9777 28 | 29 | DIHE 30 | Y2-M1-Y1-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 31 | Y5-M1-Y1-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 32 | Y5-M1-Y2-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 33 | Y6-M1-Y1-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 34 | Y6-M1-Y2-hn 3 0.00 0.00 3.0 Treat as zero by MCPB.py 35 | hn-Y2-M1-Y1 3 0.00 0.00 3.0 Treat as zero by MCPB.py 36 | 37 | IMPR 38 | 39 | NONB 40 | M1 1.2190 0.0015090300 CM set for Pt2+ ion in OPC water from Li et al. JCTC, 2020, 16, 4429 41 | Y1 1.8240 0.1700 OPLS 42 | Y2 1.8240 0.1700 OPLS 43 | Y5 1.9480 0.2650 same as cl 44 | Y6 1.9480 0.2650 same as cl 45 | 46 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/HEX.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | HEX 3 | 20 19 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C 2.2860 -6.0000 2.1690 c3 1 HEX -0.2862311135 10 | 2 H 3.3770 -6.0280 2.2000 hc 1 HEX 0.0570747751 11 | 3 H1 1.9390 -6.9780 1.8320 hc 1 HEX 0.0570747751 12 | 4 C1 1.7950 -4.8950 1.2380 c3 1 HEX 0.2930074691 13 | 5 H2 1.9270 -5.8520 3.1890 hc 1 HEX 0.0570747751 14 | 6 C2 2.2760 -5.0700 -0.2000 c3 1 HEX -0.0266595638 15 | 7 H3 2.1310 -3.9240 1.6130 hc 1 HEX -0.0635744885 16 | 8 H4 0.7010 -4.8670 1.2490 hc 1 HEX -0.0635744885 17 | 9 H5 3.3710 -5.1000 -0.2110 hc 1 HEX -0.0122370908 18 | 10 C3 1.7930 -3.9710 -1.1410 c3 1 HEX -0.0246580934 19 | 11 H6 1.9390 -6.0420 -0.5760 hc 1 HEX -0.0122370908 20 | 12 H7 2.1300 -2.9990 -0.7650 hc 1 HEX -0.0129892048 21 | 13 H8 0.6980 -3.9420 -1.1300 hc 1 HEX -0.0129892048 22 | 14 C4 2.2740 -4.1460 -2.5790 c3 1 HEX 0.2952540461 23 | 15 H9 3.3680 -4.1740 -2.5900 hc 1 HEX -0.0644694640 24 | 16 C5 1.7830 -3.0420 -3.5110 c3 1 HEX -0.2867390308 25 | 17 H10 1.9380 -5.1170 -2.9540 hc 1 HEX -0.0644694640 26 | 18 H11 2.1300 -2.0630 -3.1730 hc 1 HEX 0.0571141524 27 | 19 H12 0.6920 -3.0140 -3.5410 hc 1 HEX 0.0571141524 28 | 20 H13 2.1420 -3.1890 -4.5300 hc 1 HEX 0.0571141524 29 | @BOND 30 | 1 1 2 1 31 | 2 1 3 1 32 | 3 1 4 1 33 | 4 1 5 1 34 | 5 4 6 1 35 | 6 4 7 1 36 | 7 4 8 1 37 | 8 6 9 1 38 | 9 6 10 1 39 | 10 6 11 1 40 | 11 10 12 1 41 | 12 10 13 1 42 | 13 10 14 1 43 | 14 14 15 1 44 | 15 14 16 1 45 | 16 14 17 1 46 | 17 16 18 1 47 | 18 16 19 1 48 | 19 16 20 1 49 | @SUBSTRUCTURE 50 | 1 HEX 1 TEMP 0 **** **** 0 ROOT 51 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/converter.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import parmed as pmd 4 | class Converter: 5 | def __init__(self, path, intype = 'amber', outtype = 'gromacs'): 6 | """ 7 | Class to facilitate conversion between different simulation engines 8 | 9 | Parameters: 10 | 11 | Class variables: 12 | - self.path - location of input files 13 | - self.intype - MD engine input type 14 | - self.outtype - MD engine output type 15 | - self.engines - dict containing the supported engine types 16 | - self.status - status of program (0 for error, 1 for success) 17 | - self.atoms - number of atoms in solute 18 | - self.system_size - number of atoms in system 19 | - self.original_wd 20 | """ 21 | 22 | self.path = path 23 | self.intype = intype 24 | self.outtype = outtype 25 | self.engines = ['amber', 'gromacs'] 26 | self.original_wd = os.getcwd() 27 | 28 | self.atoms = None 29 | self.system_size = None 30 | 31 | def getAtoms(self): 32 | os.chdir(self.path) 33 | f = open('input.xyz', 'r') 34 | for line in f: 35 | self.atoms = int(line.split()[0]) 36 | break 37 | f.close() 38 | os.chdir(self.original_wd) 39 | 40 | def getSystemSize(self): 41 | os.chdir(self.path) 42 | f = open('LIG_solv.prmtop', 'r') 43 | start = 0 44 | for line in f: 45 | if '%FLAG POINTERS' in line: 46 | start = 1 47 | continue 48 | if start == 2: 49 | self.system_size = int(line.split()[0]) 50 | break 51 | elif start == 1: 52 | start = 2 53 | continue 54 | f.close() 55 | os.chdir(self.original_wd) 56 | def convert(self): 57 | os.chdir(self.path) 58 | parm = pmd.load_file('LIG_solv.prmtop', 'LIG_solv.inpcrd') 59 | 60 | if self.outtype == 'gromacs': 61 | if os.path.exists('LIG_solv.top'): 62 | os.remove('LIG_solv.top') 63 | if os.path.exists('LIG_solv.gro'): 64 | os.remove('LIG_solv.gro') 65 | if os.path.exists('LIG_dry.gro'): 66 | os.remove('LIG_dry.gro') 67 | parm.save('LIG_solv.top') 68 | parm.save('LIG_solv.gro') 69 | 70 | parm = pmd.load_file('LIG_dry.prmtop', 'LIG_dry.inpcrd') 71 | parm.save('LIG_dry.top') 72 | os.chdir(self.original_wd) 73 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/BPH.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | B 10.811 4 | 5 | BOND 6 | B-o * 450.00 1.510 7 | oh-B * 450.00 1.510 8 | B-c2 340.00 1.630 9 | B-ca 340.00 1.630 10 | B-c3 326.80 1.510 11 | B-c1 340.00 1.630 12 | 13 | 14 | ANGLE 15 | B-c1-c2 50.00 109.50 16 | ca-c2-ha 47.90 123.30 17 | B-o-ho 35.00 109.50 18 | ho-oh-B 35.00 109.50 19 | B-c2-ha 50.00 109.50 20 | c1-B-c1 50.00 109.50 21 | B-c3-h1 50.00 109.50 22 | B-c3-hc 50.00 109.50 23 | B-c3-c3 50.00 109.50 24 | B-c3-n3 50.00 109.31 25 | B-c2-ca 127.38 120.97 26 | B-ca-ca 127.38 120.97 27 | B-o-c3 90.00 109.50 28 | o-B-o 90.00 109.50 29 | oh-B-o 90.00 109.50 30 | oh-B-oh 90.00 109.50 31 | oh-B-c2 60.00 109.50 32 | oh-B-ca 60.00 109.50 33 | oh-B-c3 60.00 109.50 34 | o-B-c2 60.00 109.50 35 | 2c-oh-B 60.00 109.50 36 | B-c3-ca 127.38 111.90 37 | B-c2-c2 50.00 109.50 38 | 39 | 40 | DIHE 41 | oh-B-ca-ca 1 15.7206 170.366 −1.001 42 | B-c2-ca-ca 1 0.7000 180.000 2.000 43 | B-o-c3-c3 1 3.4800 106.880 1.500 44 | B-o-c3-h1 1 4.1053 256.511 2.000 45 | o-B-o-ho 1 0.8361 0.000 3.000 46 | o-B-c2-ha 1 2.5070 172.978 0.129 47 | o-B-c2-ca 1 15.7206 170.366 −1.000 48 | o-B-o-c3 1 0.8347 0.000 3.000 49 | ho-o-B-c2 1 2.0509 112.044 5.000 50 | c2-B-o-c3 1 2.3740 114.599 −0.197 51 | cx-2c-oh-B 1 3.4800 106.881 1.500 52 | ho-oh-B-o 1 0.8361 0.000 3.000 53 | ho-oh-B-c2 1 2.0509 112.044 5.000 54 | ho-oh-B-ca 1 2.0509 112.044 5.000 55 | oh-B-o-ho 1 0.8361 0.000 3.000 56 | oh-B-oh-ho 1 0.8361 0.000 3.000 57 | oh-B-c2-ha 1 2.5070 172.978 0.129 58 | oh-B-c3-h1 1 2.5070 172.978 0.129 59 | oh-B-c2-ca 1 15.7206 170.366 −1.000 60 | oh-B-c3-ca 1 15.7205 170.366 0.000 61 | h1-2c-oh-B 1 4.1053 256.511 2.000 62 | 2c-oh-B-o 1 2.3743 114.599 −0.197 63 | 2c-oh-B-c2 1 2.3743 114.599 −0.197 64 | h1-2c-oh-B 1 4.1053 256.511 2.000 65 | oh-B-c3-n3 1 −2.2276 0.000 2.156 66 | 2c-oh-B-oh 1 −44.4201 0.000 1.251 67 | 2c-oh-B-c3 1 −12.2011 0.000 2.000 68 | ho-oh-B-c3 1 8.0608 0.000 −0.101 69 | oh-B-c3-h1 1 0.5691 0.000 2.385 70 | oh-B-ca-ca 1 15.7206 170.366 −1.001 71 | 2c-oh-B-ca 1 2.3743 114.599 −0.197 72 | c1-B-c1-c2 1 0.8361 0.000 3.000 73 | 74 | IMPROPER 75 | c1-c2-c2-ha 1.1 180.0 2.0 Using the default value 76 | c2-c2-c2-ha 1.1 180.0 2.0 Same as X -X -ca-ha, penalty score= 47.1 (use general term)) 77 | B-ha-c2-ha Improper 1.1000 180.000 2.000 78 | 79 | NONBON 80 | B 1.9800 0.0340 81 | 82 | 83 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt_atom78_property.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------- 2 | ----------------------- !PROPERTIES! ------------------------ 3 | ------------------------------------------------------------- 4 | # ----------------------------------------------------------- 5 | $ SCF_Energy 6 | description: The SCF energy 7 | geom. index: 1 8 | prop. index: 1 9 | SCF Energy: -118.3622785855 10 | # ----------------------------------------------------------- 11 | $ Calculation_Info 12 | description: Details of the calculation 13 | geom. index: 1 14 | prop. index: 1 15 | Multiplicity: 3 16 | Charge: 0 17 | number of atoms: 1 18 | number of electrons: 0 19 | number of frozen core electrons: 1 20 | number of correlated electrons: 0 21 | number of basis functions: 32 22 | number of aux C basis functions: 0 23 | number of aux J basis functions: 18 24 | number of aux JK basis functions: 0 25 | number of aux CABS basis functions: 0 26 | Total Energy -118.362279 27 | # ----------------------------------------------------------- 28 | $ SCF_Electric_Properties 29 | description: The SCF Calculated Electric Properties 30 | geom. index: 1 31 | prop. index: 1 32 | Filename : orca_opt_atom78.scfp 33 | Do Dipole Moment Calculation : true 34 | Do Quadrupole Moment Calculation : false 35 | Do Polarizability Calculation : false 36 | ** Dipole moment part of electric properties ** 37 | Magnitude of dipole moment (Debye) : 0.0000000000 38 | Electronic Contribution: 39 | 0 40 | 0 -0.000000 41 | 1 -0.000000 42 | 2 -0.000000 43 | Nuclear Contribution: 44 | 0 45 | 0 0.000000 46 | 1 0.000000 47 | 2 0.000000 48 | Total Dipole moment: 49 | 0 50 | 0 -0.000000 51 | 1 -0.000000 52 | 2 -0.000000 53 | # ------------------------------------------------------------- 54 | ----------------------- !GEOMETRIES! ------------------------ 55 | # ------------------------------------------------------------- 56 | ------------------------ !GEOMETRY! ------------------------- 57 | Number of atoms: 1 58 | Geometry Index: 1 59 | Coordinates: 60 | 0 Pt 0.000000000000 0.000000000000 0.000000000000 61 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/freq/orca_freq_atom78_property.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------- 2 | ----------------------- !PROPERTIES! ------------------------ 3 | ------------------------------------------------------------- 4 | # ----------------------------------------------------------- 5 | $ SCF_Energy 6 | description: The SCF energy 7 | geom. index: 1 8 | prop. index: 1 9 | SCF Energy: -118.3622785855 10 | # ----------------------------------------------------------- 11 | $ Calculation_Info 12 | description: Details of the calculation 13 | geom. index: 1 14 | prop. index: 1 15 | Multiplicity: 3 16 | Charge: 0 17 | number of atoms: 1 18 | number of electrons: 0 19 | number of frozen core electrons: 1 20 | number of correlated electrons: 0 21 | number of basis functions: 32 22 | number of aux C basis functions: 0 23 | number of aux J basis functions: 18 24 | number of aux JK basis functions: 0 25 | number of aux CABS basis functions: 0 26 | Total Energy -118.362279 27 | # ----------------------------------------------------------- 28 | $ SCF_Electric_Properties 29 | description: The SCF Calculated Electric Properties 30 | geom. index: 1 31 | prop. index: 1 32 | Filename : orca_freq_atom78.scfp 33 | Do Dipole Moment Calculation : true 34 | Do Quadrupole Moment Calculation : false 35 | Do Polarizability Calculation : false 36 | ** Dipole moment part of electric properties ** 37 | Magnitude of dipole moment (Debye) : 0.0000000000 38 | Electronic Contribution: 39 | 0 40 | 0 -0.000000 41 | 1 -0.000000 42 | 2 -0.000000 43 | Nuclear Contribution: 44 | 0 45 | 0 0.000000 46 | 1 0.000000 47 | 2 0.000000 48 | Total Dipole moment: 49 | 0 50 | 0 -0.000000 51 | 1 -0.000000 52 | 2 -0.000000 53 | # ------------------------------------------------------------- 54 | ----------------------- !GEOMETRIES! ------------------------ 55 | # ------------------------------------------------------------- 56 | ------------------------ !GEOMETRY! ------------------------- 57 | Number of atoms: 1 58 | Geometry Index: 1 59 | Coordinates: 60 | 0 Pt 0.000000000000 0.000000000000 0.000000000000 61 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/BARF.frcmod: -------------------------------------------------------------------------------- 1 | Remark line goes here 2 | MASS 3 | B 10.811 4 | 5 | BOND 6 | B-o * 450.00 1.510 7 | oh-B * 450.00 1.510 8 | B-c2 340.00 1.630 9 | B-ca 340.00 1.630 10 | B-c3 326.80 1.510 11 | B-c1 340.00 1.630 12 | 13 | 14 | ANGLE 15 | B-c1-c2 50.00 109.50 16 | ca-c2-ha 47.90 123.30 17 | B-o-ho 35.00 109.50 18 | ho-oh-B 35.00 109.50 19 | B-c2-ha 50.00 109.50 20 | c1-B-c1 50.00 109.50 21 | B-c3-h1 50.00 109.50 22 | B-c3-hc 50.00 109.50 23 | B-c3-c3 50.00 109.50 24 | B-c3-n3 50.00 109.31 25 | B-c2-ca 127.38 120.97 26 | B-ca-ca 127.38 120.97 27 | B-o-c3 90.00 109.50 28 | o-B-o 90.00 109.50 29 | oh-B-o 90.00 109.50 30 | oh-B-oh 90.00 109.50 31 | oh-B-c2 60.00 109.50 32 | oh-B-ca 60.00 109.50 33 | oh-B-c3 60.00 109.50 34 | o-B-c2 60.00 109.50 35 | 2c-oh-B 60.00 109.50 36 | B-c3-ca 127.38 111.90 37 | B-c2-c2 50.00 109.50 38 | 39 | 40 | DIHE 41 | oh-B-ca-ca 1 15.7206 170.366 −1.001 42 | B-c2-ca-ca 1 0.7000 180.000 2.000 43 | B-o-c3-c3 1 3.4800 106.880 1.500 44 | B-o-c3-h1 1 4.1053 256.511 2.000 45 | o-B-o-ho 1 0.8361 0.000 3.000 46 | o-B-c2-ha 1 2.5070 172.978 0.129 47 | o-B-c2-ca 1 15.7206 170.366 −1.000 48 | o-B-o-c3 1 0.8347 0.000 3.000 49 | ho-o-B-c2 1 2.0509 112.044 5.000 50 | c2-B-o-c3 1 2.3740 114.599 −0.197 51 | cx-2c-oh-B 1 3.4800 106.881 1.500 52 | ho-oh-B-o 1 0.8361 0.000 3.000 53 | ho-oh-B-c2 1 2.0509 112.044 5.000 54 | ho-oh-B-ca 1 2.0509 112.044 5.000 55 | oh-B-o-ho 1 0.8361 0.000 3.000 56 | oh-B-oh-ho 1 0.8361 0.000 3.000 57 | oh-B-c2-ha 1 2.5070 172.978 0.129 58 | oh-B-c3-h1 1 2.5070 172.978 0.129 59 | oh-B-c2-ca 1 15.7206 170.366 −1.000 60 | oh-B-c3-ca 1 15.7205 170.366 0.000 61 | h1-2c-oh-B 1 4.1053 256.511 2.000 62 | 2c-oh-B-o 1 2.3743 114.599 −0.197 63 | 2c-oh-B-c2 1 2.3743 114.599 −0.197 64 | h1-2c-oh-B 1 4.1053 256.511 2.000 65 | oh-B-c3-n3 1 −2.2276 0.000 2.156 66 | 2c-oh-B-oh 1 −44.4201 0.000 1.251 67 | 2c-oh-B-c3 1 −12.2011 0.000 2.000 68 | ho-oh-B-c3 1 8.0608 0.000 −0.101 69 | oh-B-c3-h1 1 0.5691 0.000 2.385 70 | oh-B-ca-ca 1 15.7206 170.366 −1.001 71 | 2c-oh-B-ca 1 2.3743 114.599 −0.197 72 | c1-B-c1-c2 1 0.8361 0.000 3.000 73 | 74 | IMPROPER 75 | c1-c2-c2-ha 1.1 180.0 2.0 Using the default value 76 | c2-c2-c2-ha 1.1 180.0 2.0 Same as X -X -ca-ha, penalty score= 47.1 (use general term)) 77 | c2-c2-c2-c3 1.1 180.0 2.0 Using the default value 78 | B-ha-c2-ha Improper 1.1000 180.000 2.000 79 | 80 | NONBON 81 | B 1.9800 0.0340 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/PyConSolv/scripts_and_inputs/simulation_gro.mdp: -------------------------------------------------------------------------------- 1 | title = PyConSolv NPT simulation 2 | ; Run parameters 3 | integrator = md ; leap-frog integrator 4 | nsteps = 50000000 ; 2 * 500000 = 100000 ps (10 ns) 5 | dt = 0.002 ; 2 fs 6 | ; Output control 7 | nstxout = 0 ; suppress bulky .trr file by specifying 8 | nstvout = 0 ; 0 for output frequency of nstxout, 9 | nstfout = 0 ; nstvout, and nstfout 10 | nstenergy = 5000 ; save energies every 10.0 ps 11 | nstlog = 5000 ; update log file every 10.0 ps 12 | nstxout-compressed = 5000 ; save compressed coordinates every 10.0 ps 13 | compressed-x-grps = System ; save the whole system 14 | ; Bond parameters 15 | continuation = yes ; Restarting after NPT 16 | constraint_algorithm = lincs ; holonomic constraints 17 | constraints = h-bonds ; bonds involving H are constrained 18 | lincs_iter = 1 ; accuracy of LINCS 19 | lincs_order = 4 ; also related to accuracy 20 | ; Neighborsearching 21 | cutoff-scheme = Verlet ; Buffered neighbor searching 22 | ns_type = grid ; search neighboring grid cells 23 | nstlist = 10 ; 20 fs, largely irrelevant with Verlet scheme 24 | rcoulomb = 1.0 ; short-range electrostatic cutoff (in nm) 25 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 26 | ; Electrostatics 27 | coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics 28 | pme_order = 4 ; cubic interpolation 29 | fourierspacing = 0.16 ; grid spacing for FFT 30 | ; Temperature coupling is on 31 | tcoupl = V-rescale ; modified Berendsen thermostat 32 | tc-grps = Solute SOL ; two coupling groups - more accurate 33 | tau_t = 0.1 0.1 ; time constant, in ps 34 | ref_t = 300 300 ; reference temperature, one for each group, in K 35 | ; Pressure coupling is on 36 | pcoupl = Parrinello-Rahman ; Pressure coupling on in NPT 37 | pcoupltype = isotropic ; uniform scaling of box vectors 38 | tau_p = 2.0 ; time constant, in ps 39 | ref_p = 1.0 ; reference pressure, in bar 40 | compressibility = 4.5e-5 ; isothermal compressibility of water, bar^-1 41 | ; Periodic boundary conditions 42 | pbc = xyz ; 3-D PBC 43 | ; Dispersion correction 44 | DispCorr = EnerPres ; account for cut-off vdW scheme 45 | ; Velocity generation 46 | gen_vel = no ; Velocity generation is off -------------------------------------------------------------------------------- /src/PyConSolv/misc/ions.py: -------------------------------------------------------------------------------- 1 | class ionlib(): 2 | def __init__(self): 3 | self.ionsinAmber = {"Ag2+": ["Ag", 2], 4 | "Be2+": ["Be", 2], 5 | "Cu2+": ["CU", 2], 6 | "Ni2+": ["NI", 2], 7 | "Zn2+": ["ZN", 2], 8 | "Co2+": ["CO", 2], 9 | "Cr2+": ["Cr", 2], 10 | "Fe2+": ["FE2", 2], 11 | "Mg2+": ["MG", 2], 12 | "V2+": ["V2+", 2], 13 | "Mn2+": ["MN", 2], 14 | "Hg2+": ["HG", 2], 15 | "Cd2+": ["CD", 2], 16 | "Ca2+": ["CA", 2], 17 | "Sn2+": ["Sn", 2], 18 | "Sr2+": ["SR", 2], 19 | "Ba2+": ["BA", 2], 20 | "Al3+": ["AL", 3], 21 | "Fe3+": ["FE", 3], 22 | "Cr3+": ["CR", 3], 23 | "In3+": ["IN", 3], 24 | "Tl3+": ["Tl", 3], 25 | "Y3+": ["Y", 3], 26 | "La3+": ["LA", 3], 27 | "Ce3+": ["Ce", 3], 28 | "Pr3+": ["PR", 3], 29 | "Nd3+": ["Nd", 3], 30 | "Sm3+": ["SM", 3], 31 | "Sm2+": ["Sm", 3], 32 | "Eu3+": ["EU3", 3], 33 | "Gd3+": ["GD3", 3], 34 | "Tb3+": ["TB", 3], 35 | "Dy3+": ["Dy", 3], 36 | "Er3+": ["Er", 3], 37 | "Tm3+": ["Tm", 3], 38 | "Lu3+": ["LU", 3], 39 | "Hf4+": ["Hf", 4], 40 | "Zr4+": ["Zr", 4], 41 | "Ce4+": ["CE", 4], 42 | "U4+": ["U4+", 4], 43 | "Pu4+": ["Pu", 4], 44 | "Th4+": ["Th", 4], 45 | "Li+": ["LI", 1], 46 | "Na+": ["NA", 1], 47 | "K+": ["K", 1], 48 | "Rb+": ["RB", 1], 49 | "Cs+": ["CS", 1], 50 | "Tl+": ["TL", 1], 51 | "Cu+": ["CU1", 1], 52 | "Ag+": ["AG", 1], 53 | "NH4+": ["NH4", 1], 54 | "H3O+": ["H3O+", 1], 55 | "F-": ["F", -1], 56 | "Cl-": ["CL", -1], 57 | "Br-": ["BR", -1], 58 | "I-": ["IOD", -1] 59 | } 60 | -------------------------------------------------------------------------------- /src/PyConSolv/db/atom-radius.txt: -------------------------------------------------------------------------------- 1 | Atomic Number Element Symbol Atomic Ionic Covalent Van-der-Waals "Crystal" 2 | 1 H 0.53 0.25 0.37 1.20 0.10 3 | 2 He 0.31 0.31 0.32 1.40 4 | 3 Li 1.67 1.45 1.34 1.82 0.90 5 | 4 Be 1.12 1.05 0.90 0.41 6 | 5 B 0.87 0.85 0.82 0.25 7 | 6 C 0.67 0.70 0.77 1.70 0.29 8 | 7 N 0.56 0.65 0.75 1.55 0.30 9 | 8 O 0.48 0.60 0.73 1.52 1.21 10 | 9 F 0.42 0.50 0.71 1.47 1.19 11 | 10 Ne 0.38 0.38 0.69 1.54 12 | 11 Na 1.90 1.80 1.54 2.27 1.16 13 | 12 Mg 1.45 1.50 1.30 1.73 0.86 14 | 13 Al 1.18 1.25 1.18 0.53 15 | 14 Si 1.11 1.10 1.11 2.10 0.40 16 | 15 P 0.98 1.00 1.06 1.80 0.31 17 | 16 S 0.88 1.00 1.02 1.80 0.43 18 | 17 Cl 0.79 1.00 0.99 1.75 1.67 19 | 18 Ar 0.71 0.71 0.97 1.88 20 | 19 K 2.43 2.20 1.96 2.75 1.52 21 | 20 Ca 1.94 1.80 1.74 1.14 22 | 21 Sc 1.84 1.60 1.44 0.89 23 | 22 Ti 1.76 1.40 1.36 0.75 24 | 23 V 1.71 1.35 1.25 0.68 25 | 24 Cr 1.66 1.40 1.27 0.76 26 | 25 Mn 1.61 1.40 1.39 0.81 27 | 26 Fe 1.56 1.40 1.25 0.69 28 | 27 Co 1.52 1.35 1.26 0.54 29 | 28 Ni 1.49 1.35 1.21 1.63 0.70 30 | 29 Cu 1.45 1.35 1.38 1.40 0.71 31 | 30 Zn 1.42 1.35 1.31 1.39 0.74 32 | 31 Ga 1.36 1.30 1.26 1.87 0.76 33 | 32 Ge 1.25 1.25 1.22 0.53 34 | 33 As 1.14 1.15 1.19 1.85 0.72 35 | 34 Se 1.03 1.15 1.16 1.90 0.56 36 | 35 Br 0.94 1.15 1.14 1.85 1.82 37 | 36 Kr 0.88 0.88 1.10 2.02 38 | 37 Rb 2.65 2.35 2.11 1.66 39 | 38 Sr 2.19 2.00 1.92 1.32 40 | 39 Y 2.12 1.85 1.62 1.04 41 | 40 Zr 2.06 1.55 1.48 0.86 42 | 41 Nb 1.98 1.45 1.37 0.78 43 | 42 Mo 1.90 1.45 1.45 0.79 44 | 43 Tc 1.83 1.35 1.56 0.79 45 | 44 Ru 1.78 1.30 1.26 0.82 46 | 45 Rh 1.73 1.35 1.35 0.81 47 | 46 Pd 1.69 1.40 1.31 1.63 0.78 48 | 47 Ag 1.65 1.60 1.53 1.72 1.29 49 | 48 Cd 1.61 1.55 1.48 1.58 0.92 50 | 49 In 1.56 1.55 1.44 1.93 0.94 51 | 50 Sn 1.45 1.45 1.41 2.17 0.69 52 | 51 Sb 1.33 1.45 1.38 0.90 53 | 52 Te 1.23 1.40 1.35 2.06 1.11 54 | 53 I 1.15 1.40 1.33 1.98 2.06 55 | 54 Xe 1.08 1.08 1.30 2.16 0.62 56 | 55 Cs 2.98 2.60 2.25 1.81 57 | 56 Ba 2.53 2.15 1.98 1.49 58 | 57 La 1.95 1.95 1.69 1.36 59 | 58 Ce 1.85 1.85 1.15 60 | 59 Pr 2.47 1.85 1.32 61 | 60 Nd 2.06 1.85 1.30 62 | 61 Pm 2.05 1.85 1.28 63 | 62 Sm 2.38 1.85 1.10 64 | 63 Eu 2.31 1.85 1.31 65 | 64 Gd 2.33 1.80 1.08 66 | 65 Tb 2.25 1.75 1.18 67 | 66 Dy 2.28 1.75 1.05 68 | 67 Ho 2.26 1.75 1.04 69 | 68 Er 2.26 1.75 1.03 70 | 69 Tm 2.22 1.75 1.02 71 | 70 Yb 2.22 1.75 1.13 72 | 71 Lu 2.17 1.75 1.60 1.00 73 | 72 Hf 2.08 1.55 1.50 0.85 74 | 73 Ta 2.00 1.45 1.38 0.78 75 | 74 W 1.93 1.35 1.46 0.74 76 | 75 Re 1.88 1.35 1.59 0.77 77 | 76 Os 1.85 1.30 1.28 0.77 78 | 77 Ir 1.80 1.35 1.37 0.77 79 | 78 Pt 1.77 1.35 1.28 1.75 0.74 80 | 79 Au 1.74 1.35 1.44 1.66 1.51 81 | 80 Hg 1.71 1.50 1.49 1.55 0.83 82 | 81 Tl 1.56 1.90 1.48 1.96 1.03 83 | 82 Pb 1.54 1.80 1.47 2.02 1.49 84 | 83 Bi 1.43 1.60 1.46 1.17 85 | 84 Po 1.35 1.90 1.08 86 | 85 At 1.27 1.27 0.76 87 | 86 Rn 1.20 1.20 1.45 88 | 87 Fr 1.94 89 | 88 Ra 2.15 1.62 90 | 89 Ac 1.95 1.95 1.26 91 | 90 Th 1.80 1.80 1.19 92 | 91 Pa 1.80 1.80 1.09 93 | 92 U 1.75 1.75 1.86 0.87 94 | 93 Np 1.75 1.75 95 | 94 Pu 1.75 1.75 1.00 96 | 95 Am 1.75 1.75 1.12 97 | 96 Cm 1.11 98 | -------------------------------------------------------------------------------- /src/PyConSolv/solvents/OCT.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | OCT 3 | 27 26 1 0 0 4 | SMALL 5 | bcc 6 | 7 | 8 | @ATOM 9 | 1 C 2.2740 -6.1010 2.3610 c3 1 OCT -0.2897696493 10 | 2 H 3.3660 -6.1260 2.3920 hc 1 OCT 0.0593846131 11 | 3 H1 1.9300 -7.0760 2.0100 hc 1 OCT 0.0593846131 12 | 4 C1 1.7810 -4.9860 1.4430 c3 1 OCT 0.2645514103 13 | 5 H2 1.9140 -5.9670 3.3820 hc 1 OCT 0.0593846131 14 | 6 C2 2.2640 -5.1410 0.0040 c3 1 OCT -0.0129510424 15 | 7 H3 2.1150 -4.0180 1.8310 hc 1 OCT -0.0547326339 16 | 8 H4 0.6870 -4.9610 1.4540 hc 1 OCT -0.0547326339 17 | 9 H5 3.3590 -5.1690 -0.0070 hc 1 OCT -0.0113329703 18 | 10 C3 1.7800 -4.0290 -0.9230 c3 1 OCT -0.0178209976 19 | 11 H6 1.9280 -6.1080 -0.3860 hc 1 OCT -0.0113329703 20 | 12 H7 2.1190 -3.0630 -0.5350 hc 1 OCT -0.0185950306 21 | 13 H8 0.6860 -4.0000 -0.9110 hc 1 OCT -0.0185950306 22 | 14 C4 2.2620 -4.1890 -2.3630 c3 1 OCT 0.2450820604 23 | 15 H9 3.3570 -4.2190 -2.3770 hc 1 OCT -0.0705458933 24 | 16 C5 1.7790 -3.0760 -3.2900 c3 1 OCT 0.0194631097 25 | 17 H10 1.9220 -5.1540 -2.7520 hc 1 OCT -0.0705458933 26 | 18 H11 2.1220 -2.1100 -2.9030 hc 1 OCT -0.0333503167 27 | 19 H12 0.6850 -3.0440 -3.2740 hc 1 OCT -0.0333503167 28 | 20 C6 2.2580 -3.2450 -4.7300 c3 1 OCT -0.0280936451 29 | 21 H13 3.3530 -3.2690 -4.7520 hc 1 OCT -0.0018068457 30 | 22 C7 1.7720 -2.1290 -5.6390 c3 1 OCT 0.3519664671 31 | 23 H14 1.9080 -4.2010 -5.1280 hc 1 OCT -0.0018068457 32 | 24 H15 2.1160 -1.1600 -5.2620 h1 1 OCT -0.0083488294 33 | 25 H16 0.6820 -2.1070 -5.6630 h1 1 OCT -0.0083488294 34 | 26 O 2.1800 -2.3020 -7.0000 oh 1 OCT -0.7505087820 35 | 27 H17 3.1440 -2.2970 -7.0210 ho 1 OCT 0.4373522695 36 | @BOND 37 | 1 1 2 1 38 | 2 1 3 1 39 | 3 1 4 1 40 | 4 1 5 1 41 | 5 4 6 1 42 | 6 4 7 1 43 | 7 4 8 1 44 | 8 6 9 1 45 | 9 6 10 1 46 | 10 6 11 1 47 | 11 10 12 1 48 | 12 10 13 1 49 | 13 10 14 1 50 | 14 14 15 1 51 | 15 14 16 1 52 | 16 14 17 1 53 | 17 16 18 1 54 | 18 16 19 1 55 | 19 16 20 1 56 | 20 20 21 1 57 | 21 20 22 1 58 | 22 20 23 1 59 | 23 22 24 1 60 | 24 22 25 1 61 | 25 22 26 1 62 | 26 26 27 1 63 | @SUBSTRUCTURE 64 | 1 OCT 1 TEMP 0 **** **** 0 ROOT 65 | -------------------------------------------------------------------------------- /tests/test_filestructure.py: -------------------------------------------------------------------------------- 1 | import os 2 | import unittest 3 | import filecmp 4 | from ..src.PyConSolv.misc.filestructure import Setup 5 | 6 | 7 | class TestSetup(unittest.TestCase): 8 | def setUp(self): 9 | self.testRefPath = os.path.split(__file__)[0] + '/TestReference/' 10 | self.testFilePath = os.path.split(__file__)[0] + '/Testfiles/' 11 | self.setup = Setup(self.testFilePath + '/input.xyz', charge=0) 12 | 13 | def test_createFolders(self): 14 | self.setup.createFolders() 15 | sum = 0 16 | if os.path.exists(self.testFilePath + '/equilibration'): 17 | sum += 1 18 | os.rmdir(self.testFilePath + '/equilibration') 19 | if os.path.exists(self.testFilePath + '/simulation'): 20 | sum += 1 21 | os.rmdir(self.testFilePath + '/simulation') 22 | if os.path.exists(self.testFilePath + '/MCPB_setup'): 23 | sum += 1 24 | os.rmdir(self.testFilePath + '/MCPB_setup') 25 | if os.path.exists(self.testFilePath + '/orca_calculations/opt'): 26 | sum += 1 27 | os.rmdir(self.testFilePath + '/orca_calculations/opt') 28 | if os.path.exists(self.testFilePath + '/orca_calculations/freq'): 29 | sum += 1 30 | os.rmdir(self.testFilePath + '/orca_calculations/freq') 31 | if os.path.exists(self.testFilePath + '/orca_calculations'): 32 | sum += 1 33 | os.rmdir(self.testFilePath + '/orca_calculations') 34 | self.assertEqual(sum,6,'There should be 6 checks completed for 5 directories') 35 | def test_createFiles(self): 36 | method = 'BP86' 37 | basis = 'def2-TZVP' 38 | dsp = 'D3' 39 | solvent = 'CH2Cl2' 40 | cpu = 8 41 | 42 | self.setup.Method(method = method, basis = basis, DSP = dsp, CPCM=solvent, CPU = cpu) 43 | os.mkdir(self.testFilePath + '/orca_calculations/') 44 | os.mkdir(self.testFilePath + '/orca_calculations/opt') 45 | os.mkdir(self.testFilePath + '/orca_calculations/freq') 46 | self.setup.createFiles() 47 | sum = 0 48 | if filecmp.cmp(self.testFilePath + '/orca_calculations/opt/orca_opt.inp', 49 | self.testRefPath + '/orca_calculations/opt/orca_opt.inp'): 50 | sum += 1 51 | os.remove(self.testFilePath + '/orca_calculations/opt/orca_opt.inp') 52 | 53 | if filecmp.cmp(self.testFilePath + '/orca_calculations/freq/orca_freq.inp', 54 | self.testRefPath + '/orca_calculations/freq/orca_freq.inp'): 55 | sum += 1 56 | os.remove(self.testFilePath + '/orca_calculations/freq/orca_freq.inp') 57 | 58 | if os.path.exists(self.testFilePath + '/orca_calculations/opt/input.xyz'): 59 | if filecmp.cmp(self.testFilePath + '/orca_calculations/opt/input.xyz', 60 | self.testRefPath + '/orca_calculations/opt/input.xyz'): 61 | sum += 1 62 | os.remove(self.testFilePath + '/orca_calculations/opt/input.xyz') 63 | 64 | os.rmdir(self.testFilePath + '/orca_calculations/opt') 65 | os.rmdir(self.testFilePath + '/orca_calculations/freq') 66 | os.rmdir(self.testFilePath + '/orca_calculations/') 67 | 68 | self.assertEqual(sum, 3, 'Not all orca input files are identical') 69 | 70 | if __name__ == '__main__': 71 | unittest.main() -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/MCPB_s4.out: -------------------------------------------------------------------------------- 1 | ****************************************************************** 2 | * Welcome to use the MCPB.py program * 3 | * Version 7.0 * 4 | * Author: Pengfei Li * 5 | * Merz Research Group * 6 | * Michigan State University * 7 | * AND * 8 | * Hammes-Schiffer Research Group * 9 | * Yale University * 10 | * AND * 11 | * Li Research Group * 12 | * Loyola University Chicago * 13 | ****************************************************************** 14 | The input file you are using is : input.in 15 | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 16 | The following is the input variable you have: 17 | The variable ion_ids is : [1] 18 | The variable ion_info is : [] 19 | The variable ion_mol2files is : ['PT.mol2'] 20 | The variable original_pdb is : Full_PDB.pdb 21 | The variable add_bonded_pairs is : [(1, 10), (1, 11)] 22 | The variable add_redcrd is : 0 23 | The variable additional_resids is : [] 24 | The variable anglefc_avg is : 0 25 | The variable bondfc_avg is : 0 26 | The variable chgfix_resids is : [] 27 | The variable cut_off is : 2.8 28 | The variable force_field is : ff19SB 29 | The variable frcmod_files is : ['B.frcmod', 'C.frcmod', 'D.frcmod', 'E.frcmod'] 30 | The variable gaff is : 1 31 | The variable group_name is : LIG 32 | The variable ion_paraset is : 12_6 (Only for the ions using the nonbonded model). 33 | The variable large_opt is : 0 34 | The variable lgmodel_chg is : -99 35 | The variable lgmodel_spin is : -99 36 | -99 means program will assign a charge automatically. 37 | The variable naa_mol2files is : ['B.mol2', 'C.mol2', 'D.mol2', 'E.mol2'] 38 | The variable scale_factor is : 1.0 39 | ATTENTION: This is the scale factor of frequency. The 40 | force constants will be scaled by multiplying the square 41 | of scale_factor. 42 | The variable smmodel_chg is : -99 43 | The variable smmodel_spin is : -99 44 | -99 means program will assign a charge automatically. 45 | The variable software_version is : g16 46 | The variable sqm_opt is : 0 47 | The variable water_model is : OPC 48 | The variable xstru is : 0 49 | ****************************************************************** 50 | * * 51 | *=================Generating input file for leap=================* 52 | * * 53 | ****************************************************************** 54 | Generating the leap input file... 55 | Renamed residues includes: 1-PT 56 | Renamed residues includes: 2-B 57 | Renamed residues includes: 3-C 58 | Renamed residues includes: 4-D 59 | Renamed residues includes: 5-E 60 | Finish generating the leap input file. 61 | ================================================================== 62 | To cite MCPB.py please use the following reference: 63 | Pengfei Li and Kenneth M. Merz, Jr., "MCPB.py: A Python Based 64 | Metal Center Parameter Builder", J. Chem. Inf. Model., 2016, 65 | 56, 599-604. 66 | Helpful tips can be found in the following book chapter: 67 | Pengfei Li and Kenneth M. Merz, Jr., "Parameterization of a Dioxygen 68 | Binding Metal Site Using the MCPB.py Program", Methods Mol. Biol., 69 | 2021, 2199, 257-275. 70 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/frcmod.py: -------------------------------------------------------------------------------- 1 | from .files import FileParser 2 | 3 | 4 | class frcmodParser(FileParser): 5 | 6 | def joinFrcmod(self): 7 | template = '''Remark line goes here 8 | MASS 9 | {} 10 | 11 | BOND 12 | {} 13 | 14 | ANGLE 15 | {} 16 | 17 | DIHE 18 | {} 19 | 20 | IMPROPER 21 | {} 22 | 23 | NONBON 24 | {} 25 | ''' 26 | mass = [] 27 | bond = [] 28 | angle = [] 29 | dihedral = [] 30 | improper = [] 31 | nonbonded = [] 32 | for file in self.files: 33 | flag = 0 34 | for line in file: 35 | if 'MASS' in line: 36 | flag = 1 37 | continue 38 | if 'BOND' in line: 39 | flag = 2 40 | continue 41 | if 'ANGLE' in line: 42 | flag = 3 43 | continue 44 | if 'DIHE' in line: 45 | flag = 4 46 | continue 47 | if 'IMPROPER' in line: 48 | flag = 5 49 | continue 50 | if 'NONBON' in line: 51 | flag = 6 52 | continue 53 | if flag == 1 : 54 | if len(line.split(' '))>1: 55 | mass.append(line.split(' ')) 56 | if flag == 2: 57 | if len(line.split(' ')) > 1: 58 | bond.append(line.split(' ')) 59 | if flag == 3: 60 | if len(line.split(' ')) > 1: 61 | angle.append(line.split(' ')) 62 | if flag == 4 : 63 | if len(line.split(' '))>1: 64 | dihedral.append(line.split(' ')) 65 | if flag == 5 : 66 | if len(line.split(' '))>1: 67 | improper.append(line.split(' ')) 68 | if flag == 6 : 69 | if len(line.split(' '))>1: 70 | nonbonded.append(line.split(' ')) 71 | 72 | masstring = '' 73 | bondstring = '' 74 | anglestring = '' 75 | dihedralstring = '' 76 | improperstring = '' 77 | nonbondedstring = '' 78 | if len(mass) > 0: 79 | for i in range(len(mass)): 80 | if mass[i][0] not in masstring: 81 | masstring = masstring + ' '.join(mass[i]) 82 | else: 83 | masstring = '\n' 84 | if len(bond) > 0: 85 | for i in range(len(bond)): 86 | if bond[i][0] not in bondstring: 87 | bondstring = bondstring + ' '.join(bond[i]) 88 | else: 89 | bondstring = '\n' 90 | if len(angle) > 0: 91 | for i in range(len(angle)): 92 | if angle[i][0] not in anglestring: 93 | anglestring = anglestring + ' '.join(angle[i]) 94 | else: 95 | anglestring = '\n' 96 | if len(dihedral) > 0: 97 | for i in range(len(dihedral)): 98 | if dihedral[i][0] not in dihedralstring: 99 | dihedralstring = dihedralstring + ' '.join(dihedral[i]) 100 | else: 101 | dihedralstring = '\n' 102 | if len(improper) > 0: 103 | for i in range(len(improper)): 104 | if improper[i][0] not in improperstring: 105 | improperstring = improperstring + ' '.join(improper[i]) 106 | else: 107 | improperstring = '\n' 108 | if len(nonbonded) > 0: 109 | for i in range(len(nonbonded)): 110 | if nonbonded[i][0] not in nonbondedstring: 111 | nonbondedstring = nonbondedstring + ' '.join(nonbonded[i]) 112 | else: 113 | nonbondedstring = '\n' 114 | 115 | 116 | 117 | return template.format(masstring,bondstring,anglestring,dihedralstring,improperstring,nonbondedstring) 118 | 119 | 120 | def writeCombinedFrcmod(self): 121 | self.readfiles('{}.frcmod') 122 | frcmodString = self.joinFrcmod() 123 | self.write('LIG.frcmod', frcmodString) 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/sqm.out: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------- 2 | AMBER SQM VERSION 19 3 | 4 | By 5 | Ross C. Walker, Michael F. Crowley, Scott Brozell, 6 | Tim Giese, Andreas W. Goetz, 7 | Tai-Sung Lee and David A. Case 8 | 9 | -------------------------------------------------------- 10 | 11 | 12 | -------------------------------------------------------------------------------- 13 | QM CALCULATION INFO 14 | -------------------------------------------------------------------------------- 15 | 16 | | QMMM: Citation for AMBER QMMM Run: 17 | | QMMM: R.C. Walker, M.F. Crowley and D.A. Case, J. COMP. CHEM. 29:1019, 2008 18 | 19 | QMMM: SINGLET STATE CALCULATION 20 | QMMM: RHF CALCULATION, NO. OF DOUBLY OCCUPIED LEVELS = 4 21 | 22 | | QMMM: *** Selected Hamiltonian *** 23 | | QMMM: AM1 24 | 25 | | QMMM: *** Parameter sets in use *** 26 | | QMMM: N : M.J.S.DEWAR et al. JACS, 107, 3902, (1985) 27 | | QMMM: H : M.J.S.DEWAR et al. JACS, 107, 3902, (1985) 28 | 29 | | QMMM: *** SCF convergence criteria *** 30 | | QMMM: Energy change : 0.1D-09 kcal/mol 31 | | QMMM: Error matrix |FP-PF| : 0.1D+00 au 32 | | QMMM: Density matrix change : 0.5D-06 33 | | QMMM: Maximum number of SCF cycles : 1000 34 | 35 | | QMMM: *** Diagonalization Routine Information *** 36 | | QMMM: Pseudo diagonalizations are allowed. 37 | | QMMM: Auto diagonalization routine selection is in use. 38 | | QMMM: 39 | | QMMM: Timing diagonalization routines: 40 | | QMMM: norbs = 7 41 | | QMMM: diag iterations used for timing = 20 42 | | QMMM: 43 | | QMMM: Internal diag routine = 0.000062 seconds 44 | | QMMM: Dspev diag routine = 0.000224 seconds 45 | | QMMM: Dspevd diag routine = 0.000181 seconds 46 | | QMMM: Dspevx diag routine = 0.000362 seconds 47 | | QMMM: Dsyev diag routine = 0.000219 seconds 48 | | QMMM: Dsyevd diag routine = 0.000210 seconds 49 | | QMMM: Dsyevr diag routine = 0.000246 seconds 50 | | QMMM: 51 | | QMMM: Pseudo diag routine = 0.000008 seconds 52 | | QMMM: 53 | | QMMM: Using internal diagonalization routine (diag_routine=1). 54 | 55 | QMMM: QM Region Cartesian Coordinates (*=link atom) 56 | QMMM: QM_NO. MM_NO. ATOM X Y Z 57 | QMMM: 1 1 N -3.1790 1.8000 -1.0170 58 | QMMM: 2 2 H -3.0300 2.6900 -0.5150 59 | QMMM: 3 3 H -4.1560 1.8000 -1.3560 60 | QMMM: 4 4 H -2.5670 1.8150 -1.8480 61 | 62 | -------------------------------------------------------------------------------- 63 | RESULTS 64 | -------------------------------------------------------------------------------- 65 | 66 | ... geometry converged ! 67 | 68 | Final MO eigenvalues (eV): 69 | -32.6881 -15.9014 -15.9014 -10.4184 4.2228 6.1678 6.1678 70 | 71 | Heat of formation = -7.29251288 kcal/mol ( -0.31622709 eV) 72 | 73 | Total SCF energy = -5732.76248335 kcal/mol ( -248.59123556 eV) 74 | Electronic energy = -10024.63566131 kcal/mol ( -434.70082222 eV) 75 | Core-core repulsion = 4291.87317796 kcal/mol ( 186.10958666 eV) 76 | 77 | Atomic Charges for Step 1 : 78 | Atom Element Mulliken Charge 79 | 1 N -0.396 80 | 2 H 0.132 81 | 3 H 0.132 82 | 4 H 0.132 83 | Total Mulliken Charge = -0.000 84 | 85 | X Y Z TOTAL 86 | QM DIPOLE -0.349 1.458 -1.079 1.847 87 | 88 | Final Structure 89 | 90 | QMMM: QM Region Cartesian Coordinates (*=link atom) 91 | QMMM: QM_NO. MM_NO. ATOM X Y Z 92 | QMMM: 1 1 N -3.1850 1.8256 -1.0355 93 | QMMM: 2 2 H -3.0341 2.6692 -0.5244 94 | QMMM: 3 3 H -4.1326 1.7978 -1.3469 95 | QMMM: 4 4 H -2.5803 1.8124 -1.8292 96 | 97 | --------- Calculation Completed ---------- 98 | 99 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/clustering.py: -------------------------------------------------------------------------------- 1 | class Cluster: 2 | def __init__(self, clustering, engine = 'amber'): 3 | """ 4 | Class to generate cpptraj input files for clustering 5 | 6 | Parameters: 7 | :param str clustering: clustering method 8 | 9 | Class variables: 10 | - self.engine - simulation engine to be used 11 | - self.runtypes - clustering methods in cpptraj 12 | - self.clustering - chosen clustering method 13 | - self.kmeans - template input file for kmeans clustering 14 | - self.dpeaks - template input file for dpeaks clustering 15 | - self.dbscan - template input file for dbscan clustering 16 | - self.hierarchical - template input file for hierarchical clustering 17 | """ 18 | 19 | self.engine = engine 20 | if engine == 'gromacs': 21 | self.suffix = 'xtc' 22 | else: 23 | self.suffix = 'nc' 24 | self.runtypes = ['kmeans', 'hierarchical', 'dbscan', 'dpeaks'] 25 | self.clustering = clustering 26 | self.kmeans = r"""parm LIG_dry.prmtop 27 | trajin dry_aligned.{} 28 | cluster c1 \ 29 | kmeans clusters {} randompoint maxit 500 \ 30 | rms !@H= \ 31 | sieve {} random \ 32 | out cnumvtime.dat \ 33 | summary summary.dat \ 34 | info info.dat \ 35 | cpopvtime cpopvtime.agr normframe \ 36 | repout rep repfmt pdb \ 37 | singlerepout singlerep.nc singlerepfmt netcdf \ 38 | avgout avg avgfmt pdb 39 | run 40 | """ 41 | self.dbscan = r"""parm LIG_dry.prmtop 42 | trajin dry_aligned.{} 43 | cluster c1 \ 44 | dbscan minpoints {} epsilon {} kdist {}\ 45 | rms !@H= \ 46 | sieve {} random \ 47 | out cnumvtime.dat \ 48 | summary summary.dat \ 49 | info info.dat \ 50 | cpopvtime cpopvtime.agr normframe \ 51 | repout rep repfmt pdb \ 52 | singlerepout singlerep.nc singlerepfmt netcdf \ 53 | avgout avg avgfmt pdb 54 | run 55 | """ 56 | self.dpeaks = r"""parm LIG_dry.prmtop 57 | trajin dry_aligned.{} 58 | cluster c1 \ 59 | dpeaks epsilon {} \ 60 | rms !@H= \ 61 | sieve {} random \ 62 | out cnumvtime.dat \ 63 | summary summary.dat \ 64 | info info.dat \ 65 | cpopvtime cpopvtime.agr normframe \ 66 | repout rep repfmt pdb \ 67 | singlerepout singlerep.nc singlerepfmt netcdf \ 68 | avgout avg avgfmt pdb 69 | run 70 | """ 71 | self.hierarchical = r"""parm LIG_dry.prmtop 72 | trajin dry_aligned.{} 73 | cluster c1 \ 74 | hieragglo clusters {} {} \ 75 | rms !@H= \ 76 | sieve {} random \ 77 | out cnumvtime.dat \ 78 | summary summary.dat \ 79 | info info.dat \ 80 | cpopvtime cpopvtime.agr normframe \ 81 | repout rep repfmt pdb \ 82 | singlerepout singlerep.nc singlerepfmt netcdf \ 83 | avgout avg avgfmt pdb 84 | run 85 | """ 86 | 87 | def createInput(self): 88 | inputstr = None 89 | match self.clustering: 90 | case 'kmeans': 91 | clusters = input('Please enter the number of desired clusters: (default 10)\n') or '10' 92 | inputstr = self.kmeans.format(self.suffix, clusters, '{}') 93 | case 'dbscan': 94 | minpoints = input('Please enter the minimum number of points for a cluster: ()\n') 95 | epsilon = input('Please enter the epsilon value: ()\n') 96 | kdist = input('Please enter the kdist: ()\n') 97 | inputstr = self.dbscan.format(self.suffix, minpoints, epsilon, kdist, '{}') 98 | case 'dpeaks': 99 | epsilon = input('Please enter the epsilon value: ()\n') 100 | inputstr = self.dpeaks.format(self.suffix, epsilon, '{}') 101 | 102 | case 'hierarchical': 103 | clusters = input('Please enter the number of desired clusters: (default 10)\n') or '10' 104 | linkage = input('Please enter the linkage type (linkage, averagelinkage, complete): (Default averagelinkage)\n') or 'averagelinkage' 105 | match linkage: 106 | case 'linkage': 107 | inputstr = self.hierarchical.format(self.suffix, clusters, linkage, '{}') 108 | case 'averagelinkage': 109 | inputstr = self.hierarchical.format(self.suffix, clusters, linkage, '{}') 110 | case 'complete': 111 | inputstr = self.hierarchical.format(self.suffix, clusters, linkage, '{}') 112 | 113 | sieve = input('Please enter the value for the frame number sieve: (default 10)\n') or '10' 114 | return inputstr.format(sieve) 115 | -------------------------------------------------------------------------------- /src/PyConSolv/pyconsolv.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import os 4 | import argparse 5 | 6 | from PyConSolv.ConfGen import PyConSolv 7 | from PyConSolv.misc.analysis import Analysis 8 | 9 | 10 | def main(): 11 | ver = '1.0.6.3.1' 12 | parser = argparse.ArgumentParser(prog='PyConSolv', description='Process commandline arguments for PyconSolv') 13 | parser.add_argument('input', help='input file in XYZ format') 14 | 15 | # parametrization 16 | parser.add_argument('-c', '--charge', nargs='?', default=0, type=int, help='charge of the system, default 0') 17 | parser.add_argument('-m', '--method', nargs='?', default='PBE0', type=str, 18 | help='ORCA optimization/frequency calculations method of choice, default PBE0') 19 | parser.add_argument('-b', '--basis', nargs='?', default='def2-SVP', type=str, 20 | help='basis set to be used for calculations, default def2-SVP') 21 | parser.add_argument('-d', '--dispersion', nargs='?', default='D4', type=str, 22 | help='dispersion corrections, default = D4') 23 | parser.add_argument('-s', '--solvent', nargs='?', default='Water', type=str, 24 | help='solvent to be used for MD simulations/ OM Calculations, default Water') 25 | parser.add_argument('-p', '--cpu', nargs='?', default=12, type=int, 26 | help='number of cpu cores to be used for calculations, default 12') 27 | parser.add_argument('-mult', '--multiplicity', nargs='?', default=1, type=int, 28 | help='multiplicity of the system, default 1') 29 | parser.add_argument('-noopt', '--noopt', action='store_false', 30 | help='do not perform geometry optimization for parametrization') 31 | parser.add_argument('-box', '--box', nargs='?', default=10, type=int, 32 | help='set the box size to use with ambertools, for solvating the system') 33 | parser.add_argument('-e', '--engine', nargs='?', default='amber', type=str, 34 | help='MD engine to be used for equilibration and simulation') 35 | parser.add_argument('-rst', '--restraint', action='store_true', 36 | help='set up system for a restrained simulation') 37 | parser.add_argument('-cart', '--cartesianrst', nargs='?', default=None, type=str, 38 | help='set up system for a simulation with cartesian restraints') 39 | parser.add_argument('-cartstr', '--cartesianrststr', nargs='?', default=100, type=int, 40 | help='strength of cartesian restraints in kcal/mol') 41 | 42 | # analysis 43 | parser.add_argument('-a', '--analyze', action='store_true', help='analyze a simulation') 44 | parser.add_argument('-nosp', '--nosp', action='store_true', help='do not run single point calculations') 45 | parser.add_argument('-mask', '--mask', nargs='?', default=0, type=str, help='atomid mask for clustering') 46 | parser.add_argument('-cluster', '--cluster', nargs='?', default=0, type=str, help='clustering method') 47 | parser.add_argument('-qmmm', '--qmmm', action='store_true', 48 | help='use a qmmm approach to determine cluster energy ranking') 49 | parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(ver)) 50 | 51 | args = parser.parse_args() 52 | 53 | inputfilepath = os.path.abspath(args.input) 54 | 55 | if args.analyze: 56 | 57 | if not args.mask: 58 | print( 59 | 'Warning, you have not provided an input mask for alignment, please provide a list of atom ids in the ' 60 | 'format: 1,2,3-10\n') 61 | mask = input() 62 | else: 63 | mask = args.mask 64 | if not args.cluster: 65 | print('Please provide a clustering method: [kmeans, dbscan, dpeaks, hierarchical]\n') 66 | cluster = input() 67 | else: 68 | cluster = args.cluster 69 | analysis = Analysis(path=inputfilepath, alignMask=mask) 70 | analysis.run(clustering=cluster, nosp=args.nosp, engine=args.engine, qmmm=args.qmmm) 71 | 72 | elif '.xyz' not in inputfilepath: 73 | print('Path does not contain a valid XYZ file\n') 74 | sys.exit() 75 | 76 | else: 77 | conf = PyConSolv(inputfilepath) 78 | conf.run(charge=args.charge, method=args.method, basis=args.basis, dsp=args.dispersion, cpu=args.cpu, 79 | solvent=args.solvent, multiplicity=args.multiplicity, engine=args.engine, opt=args.noopt, box=args.box, 80 | rst=args.restraint, cart = args.cartesianrst, cartstr = args.cartesianrststr) 81 | sys.exit() 82 | 83 | 84 | if __name__ == '__main__': 85 | main() 86 | -------------------------------------------------------------------------------- /src/PyConSolv/interfaces/multiWFN.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | import subprocess 4 | 5 | from ..utils.colorgen import Color 6 | 7 | 8 | class MultiWfnInterface: 9 | def __init__(self, path: str, orcaname: str = 'orca_freq'): 10 | """ 11 | Interface to MultiWfn 12 | 13 | Parameters: 14 | :param string path: path to orca calculation 15 | 16 | Class variables: 17 | - self.path = path to orca calculation 18 | - self.original_wd = working directory where original calculation was started from 19 | - self.status = checks if calculations failed or succeeded 20 | """ 21 | self.path = path 22 | self.original_wd = os.getcwd() 23 | os.chdir(self.path) 24 | self.status = 0 25 | self.orcaname = orcaname 26 | 27 | def ECPcheck(self): 28 | """ 29 | Checks ORCA output file for use of ECPs and creates a new molden.input file with the correct number of electrons 30 | This is needed to ensure RESP charge calculations are correct 31 | 32 | Parameters: 33 | 34 | Class variables: 35 | """ 36 | ecp = [] 37 | electrons = [] 38 | skip = True 39 | 40 | f = open(self.path + '/' + self.orcaname + '.out', 'r') 41 | 42 | for line in f: 43 | if 'CARTESIAN COORDINATES (A.U.)' in line: 44 | skip = False 45 | continue 46 | if '----------------------------' in line: 47 | continue 48 | if 'ZA' in line: 49 | continue 50 | if 'core charge reduced due to ECP' in line: 51 | break 52 | if not skip: 53 | if not line.strip(): 54 | break # break loop if line is empty 55 | electrons.append(line.split()[2]) 56 | if '* ' in line: 57 | ecp.append(line.split()[0:3]) 58 | elif '--------------------------------' in line: 59 | break 60 | f.close() 61 | if len(ecp) > 0: 62 | skip = True 63 | template = '{:<2}{:>4}{:>4}{:>22}{:>21}{:>21}\n' 64 | print('ECPs found, correcting molden input file\n') 65 | print('Atoms with ECP:') 66 | for at in ecp: 67 | print('{} with {} electrons\n'.format(at[1], int(float(at[2].replace('*', ''))))) 68 | shutil.copyfile(self.path + '/' + self.orcaname + '.molden.input', 69 | self.path + '/' + self.orcaname + '.molden.input_no_ECP') 70 | fin = open(self.path + '/' + self.orcaname + '.molden.input_no_ECP', 'r') 71 | fout = open(self.path + '/' + self.orcaname + '.molden.input', 'w') 72 | iterator = 0 73 | for line in fin: 74 | if '[Atoms] AU' in line: 75 | skip = False 76 | fout.write(line) 77 | continue 78 | if not skip: 79 | l = line.split() 80 | l[2] = int(float(electrons[iterator].replace('*', ''))) 81 | fout.write(template.format(*l)) 82 | iterator += 1 83 | if iterator >= len(electrons): 84 | skip = True 85 | else: 86 | fout.write(line) 87 | fin.close() 88 | fout.close() 89 | 90 | def generateMultiwfnInput(self): 91 | """ 92 | Creates an input file for Multiwfn, for RESP charge calculation 93 | 94 | Parameters: 95 | - inputfile = full path to xyz inputfile 96 | 97 | Class variables: 98 | """ 99 | template = '''{} 100 | 7 101 | 18 102 | 1 103 | 104 | 105 | 106 | 107 | y 108 | 0 109 | 0 110 | q 111 | ''' 112 | f = open(self.path + './multiwfn.input', 'w') 113 | f.write(template.format('./' + self.orcaname + '.molden.input')) 114 | f.close() 115 | 116 | def run(self, threads: int = 12) -> int: 117 | """ 118 | Runs the MultiWfn RESP charge calculation 119 | 120 | Parameters: 121 | :param int threads = number of threads to use for calculation 122 | 123 | Class variables: 124 | """ 125 | self.ECPcheck() 126 | self.generateMultiwfnInput() 127 | multiwfnCommand = 'Multiwfn -nt {} -silent < multiwfn.input > multiwfn.out'.format(threads) 128 | calc = subprocess.run([multiwfnCommand], shell=True) 129 | if calc.returncode == 0: 130 | print('RESP charge calculation completed successfully!\n') 131 | self.status = 1 132 | else: 133 | print(Color.RED + 'Something went wrong when running MultiWfn, please check multiwfn.out' + Color.END) 134 | self.status = 0 135 | return self.status 136 | -------------------------------------------------------------------------------- /src/PyConSolv/misc/ui.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | from tkinter import * 4 | from matplotlib.figure import Figure 5 | from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg, NavigationToolbar2Tk) 6 | from rdkit import Chem 7 | from rdkit.Chem import AllChem 8 | from rdkit.Chem import Draw 9 | 10 | 11 | class GUI: 12 | def __init__(self, window, path: str, files: list): 13 | """ 14 | Class to present a GUI to the user where charges for each fragment can be entered 15 | 16 | Parameters: 17 | :param window: TKinter window 18 | :param string path: path to pdb files of fragments 19 | :param list files: names of files for which charges need to be assigned 20 | 21 | Class variables: 22 | - self.path = path to pdb files of fragments 23 | - self.files = names of files for which charges need to be assigned 24 | - self.window = TKinter window 25 | - self.box = text entry box 26 | - self.button = ok button to proceed to next structure 27 | - self.structureid = stores the index of the current structure from the list of files 28 | - self.charges = stores value of charges for all fragments 29 | """ 30 | self.path = path 31 | self.files = files 32 | self.window = window 33 | self.box = Entry(window) 34 | self.box.insert(0, "-1") 35 | self.box.pack() 36 | self.button = Button(window, text="Assign Charge", command=self.getValue) 37 | self.button.pack() 38 | self.plot(self.path + '/' + self.files[0]) 39 | self.structureid = 0 40 | self.charges = np.zeros(len(self.files)) 41 | 42 | def plot(self, file: str): 43 | """ 44 | Create and display an image in the TKinter window 45 | 46 | Parameters: 47 | :param string file: pdb file to be displayed 48 | 49 | Class variables: 50 | - self.canvas = tkinter canvas that displays the image 51 | """ 52 | fig = plt.figure(figsize=(6, 6)) 53 | ax = plt.gca() 54 | ax.imshow(self.getPDBasImage(file)) 55 | ax.axis('off') 56 | self.canvas = FigureCanvasTkAgg(fig, master=self.window) 57 | self.canvas.get_tk_widget().pack() 58 | self.canvas.draw() 59 | 60 | def redraw(self, file: str): 61 | """ 62 | Redraw image on canvas 63 | 64 | Parameters: 65 | :param string file: pdb file to be displayed 66 | 67 | Class variables: 68 | """ 69 | self.box.delete(0, END) 70 | self.box.insert(0, "-1") 71 | ax = plt.gca() 72 | ax.imshow(self.getPDBasImage(file)) 73 | ax.axis('off') 74 | self.canvas.draw() 75 | 76 | def getValue(self): 77 | """ 78 | Get value entered in the entry box. If the last structure has a charge assigned, it closes the window 79 | and writes the charge map file. 80 | 81 | Parameters: 82 | 83 | Class variables: 84 | """ 85 | self.charges[self.structureid] = self.box.get() 86 | if self.structureid < (len(self.files) - 1): 87 | self.structureid += 1 88 | self.redraw(self.path + '/' + self.files[self.structureid]) 89 | else: 90 | self.writeChargeMap() 91 | self.quit() 92 | 93 | def writeChargeMap(self): 94 | """ 95 | Write chargeMap file, containing the charges for each fragment, to the chargeMap.dat file 96 | Format is: rows of 'filename' 'charge' 97 | 98 | Parameters: 99 | 100 | Class variables: 101 | """ 102 | print('Charges have been mapped to fragments as follows:\n') 103 | f = open(self.path + '/chargeMap.dat', 'w') 104 | for i in range(len(self.files)): 105 | line = self.files[i].split('.pdb')[0], self.charges[i] # Name charge 106 | print('{} -> {}'.format(*line)) 107 | f.write('{} {}\n'.format(*line)) 108 | f.close() 109 | print('\n') 110 | print('Map written to {}'.format(self.path + '/chargeMap.dat\n')) 111 | 112 | def getPDBasImage(self, file: str): 113 | """ 114 | Creates a 2D image of a pdb file using RDkit and returns a numpy array containing an image 115 | 116 | Parameters: 117 | :param string file: pdb file containing the fragment 118 | 119 | Class variables: 120 | 121 | Returns: 122 | - mol_img = image as a 3D numpy array (RGB) 123 | """ 124 | pdb = Chem.MolFromPDBFile(file, removeHs=False) 125 | AllChem.Compute2DCoords(pdb) 126 | for atom in pdb.GetAtoms(): 127 | if atom.GetSymbol() != 'C': 128 | atom.SetProp("atomLabel", atom.GetSymbol()) 129 | mol_img = Chem.Draw.MolToImage(pdb, size=(600, 600)) 130 | mol_img = np.asarray(mol_img) 131 | return mol_img 132 | 133 | def quit(self): 134 | """ 135 | Close window and quit tkinter 136 | 137 | Parameters: 138 | 139 | Class variables: 140 | """ 141 | self.window.quit() 142 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![License](https://img.shields.io/badge/license-GPL3-blue) 2 | [![Latest Version](https://img.shields.io/badge/release-v.1.0.6.3.1-red)](https://pypi.org/project/PyConSolv/1.0.6.2/) 3 | [![DOI](https://img.shields.io/badge/DOI-10.1021%2Facs.jcim.3c00798-blue)](https://pubs.acs.org/doi/full/10.1021/acs.jcim.3c00798) 4 | 5 | # Latest: 6 | Notice: Latest version of Ambertools does not yet support Numpy > 1.26. If you encounter numpy related errors, make sure you are using a compatible version of numpy 7 | 8 | Changelog from v 1.0.1: 9 | 10 | - More counterions are parametrized and supported by default 11 | - Box size can now be specified using the `-box` parameter 12 | - Support for multiple non-covalently bound solutes 13 | - Support for QM/MM calculations as criteria for the energy ranking of generated conformers 14 | - Support for restrained simulations involving transition states (Currently only for AmberMD) 15 | - Support for cartesian coordinate restraints for residues, suitable for GIST analysis using `-cart` for the residues and `-cartstr` for the restraint strength 16 | 17 | # PyConSolv 18 | 19 | A python based interface for generation of conformers of transition metal complexes in explicit solvent. 20 | The interface bridges to the well known MCPB.py package available within ambertools. The input required 21 | consists of only a simple xyz file and all required steps for parametrization are performed automatically, 22 | with minimal user intervention. 23 | 24 | Publication: 25 | 26 | [PyConSolv: A Python Package for Conformer Generation of (Metal-Containing) Systems in Explicit Solvent 27 | R. A. Talmazan and M. Podewitz 28 | Journal of Chemical Information and Modeling 2023, 63, 17, 5400–5407 29 | DOI: 10.1021/acs.jcim.3c00798](https://pubs.acs.org/doi/full/10.1021/acs.jcim.3c00798) 30 | 31 | 32 | 33 | ## Features 34 | Utilizes freely available software, with high performance 35 | 36 | 18 predefined solvents and 6 counterions (along with 40+ single atom ions), with the ability to use any solvent or counterion 37 | 38 | Automated molecule splitting for transition metal parametrization 39 | 40 | Utilizes ORCA 5.0 for quantum mechanical optimizations/frequency calculations 41 | 42 | Utilizes MultiWfn for the generation of the RESP charges 43 | 44 | Automated equilibration of simulation box 45 | 46 | Automated clustering 47 | 48 | 49 | ## Requirements 50 | 51 | Python >= 3.10 52 | 53 | AmberTools >= 20 54 | 55 | ORCA >= 5.0 56 | 57 | MultiWfn >= 3.8 58 | 59 | ## Installation 60 | 61 | The creation of a new virtual environment is highly recommended: 62 | 63 | using conda: 64 | ``` 65 | conda create -c conda-forge --name PyConSolv python=3.10 numpy==1.26 rdkit pandas parmed 66 | conda activate PyConSolv 67 | pip install PyConSolv 68 | ``` 69 | 70 | using pip: 71 | ``` 72 | python3 -m venv env 73 | source env/bin/activate 74 | pip install numpy==1.26 pandas rdkit parmed PyConSolv 75 | ``` 76 | 77 | ## Usage 78 | 79 | ### Console: 80 | ``` 81 | pyconsolv [-h] [-c [CHARGE]] [-m [METHOD]] [-b [BASIS]] [-d [DISPERSION]] [-s [SOLVENT]] [-p [CPU]] [-mult [MULTIPLICITY]] [-noopt] [-a [ANALYZE]] [-mask [MASK]] [-cluster [CLUSTER]] [-nosp] [-v] input 82 | ``` 83 | 84 | **positional arguments:** 85 | input file in XYZ format 86 | 87 | **options that affect simulation setup:** 88 | 89 | -c [CHARGE], --charge [CHARGE] charge of the system, default 0 90 | -m [METHOD], --method [METHOD] ORCA optimization/frequency calculations method of choice, default PBE0 91 | -b [BASIS], --basis [BASIS] basis set to be used for calculations, default def2-SVP 92 | -d [DISPERSION], --dispersion [DISPERSION] dispersion corrections, default = D4 93 | -s [SOLVENT], --solvent [SOLVENT] solvent to be used for MD simulations/ OM Calculations, default Water 94 | -p [CPU], --cpu [CPU] number of cpu cores to be used for calculations, default 12 95 | -mult [MULTIPLICITY], --multiplicity [MULTIPLICITY] multiplicity of the system, default 1 96 | -noopt perform a single point calculation instead of a geometry optimization 97 | -box specify box size for your system 98 | -e, --engine choice of simulation engine 99 | -rst, --restraint perform a restrained simulation, useful for transition states 100 | -cart, --cartesianrst [Mask] set up system for a simulation with cartesian restraints, uses the amber mask format. Use all for all solvent residues 101 | -cartstr, --cartesianrststr [Value] strength of cartesian restraints in kcal/mol 102 | 103 | **options that affect analysis**: 104 | -a , --analyze analyze a simulation 105 | -mask [MASK], --mask [MASK] atomid mask for clustering 106 | -cluster [CLUSTER], --cluster [CLUSTER] clustering method 107 | -nosp skip single point calculations for clusters 108 | -qmmm, --qmmm use a qmmm approach to determine cluster energy ranking 109 | 110 | 111 | **general options:** 112 | -h, --help show this help message and exit 113 | -v, --version show program's version number and exit 114 | 115 | 116 | see user manual for more details 117 | 118 | 119 | ### Jupyter Notebook 120 | 121 | ``` 122 | from PyConSolv import ConfGen 123 | 124 | conf = ConfGen(path/to/input.xyz) 125 | 126 | conf.run([options]) 127 | ``` 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /src/PyConSolv/counterions/BPH.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | LIG 3 | 45 48 1 0 0 4 | SMALL 5 | No Charge or Current Charge 6 | 7 | 8 | @ATOM 9 | 1 B0 5.6640 9.1890 0.9220 B 1 LIG -1.1222730793 10 | 2 C2 6.3290 9.5370 -0.5410 c1 2 LIG 0.3610693259 11 | 3 C3 5.5880 9.4100 -1.7430 c2 2 LIG -0.1772791108 12 | 4 H4 4.5140 9.1670 -1.6810 ha 2 LIG 0.0966983557 13 | 5 C5 6.1710 9.5730 -3.0120 c2 2 LIG -0.1858426048 14 | 6 C6 7.5410 9.8720 -3.1260 c2 2 LIG -0.1488930656 15 | 7 H7 8.0050 10.0030 -4.1170 ha 2 LIG 0.1129000257 16 | 8 C8 8.3100 9.9970 -1.9540 c2 2 LIG -0.1896243119 17 | 9 C9 7.7070 9.8300 -0.6940 c2 2 LIG -0.1721706693 18 | 10 H10 8.3340 9.9300 0.2080 ha 2 LIG 0.0924039472 19 | 11 H11 5.5540 9.4650 -3.9200 ha 2 LIG 0.1199662742 20 | 12 H12 9.3860 10.2250 -2.0240 ha 2 LIG 0.1215052564 21 | 13 C13 5.8550 7.5600 1.0310 c1 3 LIG 0.3567324288 22 | 14 C14 4.8850 6.6530 0.5340 c2 3 LIG -0.1681172202 23 | 15 H15 3.9320 7.0520 0.1510 ha 3 LIG 0.0926421555 24 | 16 C16 5.0950 5.2620 0.5080 c2 3 LIG -0.1919295613 25 | 17 C17 6.3040 4.7200 0.9820 c2 3 LIG -0.1468012364 26 | 18 H18 6.4740 3.6320 0.9670 ha 3 LIG 0.1127129462 27 | 19 C19 7.2930 5.5930 1.4730 c2 3 LIG -0.1899903387 28 | 20 C20 7.0640 6.9800 1.4910 c2 3 LIG -0.1710958082 29 | 21 H21 7.8590 7.6420 1.8750 ha 3 LIG 0.0947119901 30 | 22 H22 8.2490 5.1880 1.8430 ha 3 LIG 0.1210100066 31 | 23 H23 4.3100 4.5940 0.1130 ha 3 LIG 0.1212838738 32 | 24 C24 6.3780 10.0000 2.1620 c1 4 LIG 0.3575224955 33 | 25 C25 6.4560 9.4590 3.4690 c2 4 LIG -0.1726491535 34 | 26 H26 6.1180 8.4220 3.6370 ha 4 LIG 0.0934729686 35 | 27 C27 6.9430 10.1950 4.5650 c2 4 LIG -0.1894419466 36 | 28 C28 7.3760 11.5210 4.3880 c2 4 LIG -0.1470831265 37 | 29 H29 7.7610 12.1040 5.2410 ha 4 LIG 0.1122359875 38 | 30 C30 7.3060 12.0940 3.1050 c2 4 LIG -0.1892940794 39 | 31 C31 6.8150 11.3420 2.0220 c2 4 LIG -0.1697257668 40 | 32 H32 6.7620 11.8180 1.0290 ha 4 LIG 0.0939570122 41 | 33 H33 7.6350 13.1350 2.9470 ha 4 LIG 0.1205077850 42 | 34 H34 6.9850 9.7310 5.5650 ha 4 LIG 0.1211630702 43 | 35 C35 4.0940 9.6600 1.0380 c1 5 LIG 0.3560091685 44 | 36 C36 3.1840 9.0170 1.9140 c2 5 LIG -0.1674469268 45 | 37 H37 3.5170 8.1170 2.4590 ha 5 LIG 0.0929323288 46 | 38 C38 1.8730 9.4840 2.1200 c2 5 LIG -0.1904375895 47 | 39 C39 1.4200 10.6340 1.4480 c2 5 LIG -0.1477871001 48 | 40 H40 0.3940 11.0050 1.6030 ha 5 LIG 0.1125335223 49 | 41 C41 2.3000 11.3050 0.5790 c2 5 LIG -0.1881126780 50 | 42 C42 3.6070 10.8200 0.3860 c2 5 LIG -0.1737921158 51 | 43 H43 4.2790 11.3680 -0.2960 ha 5 LIG 0.0940038929 52 | 44 H44 1.9650 12.2120 0.0500 ha 5 LIG 0.1207130975 53 | 45 H45 1.2000 8.9490 2.8110 ha 5 LIG 0.1210995744 54 | @BOND 55 | 1 1 2 1 56 | 2 2 3 ar 57 | 3 2 9 ar 58 | 4 3 4 1 59 | 5 3 5 ar 60 | 6 5 6 ar 61 | 7 5 11 1 62 | 8 6 7 1 63 | 9 6 8 ar 64 | 10 8 9 ar 65 | 11 8 12 1 66 | 12 9 10 1 67 | 13 13 14 1 68 | 14 13 20 2 69 | 15 14 15 1 70 | 16 14 16 2 71 | 17 16 17 1 72 | 18 16 23 1 73 | 19 17 18 1 74 | 20 17 19 2 75 | 21 19 20 1 76 | 22 19 22 1 77 | 23 20 21 1 78 | 24 24 25 1 79 | 25 24 31 2 80 | 26 25 26 1 81 | 27 25 27 2 82 | 28 27 28 1 83 | 29 27 34 1 84 | 30 28 29 1 85 | 31 28 30 2 86 | 32 30 31 1 87 | 33 30 33 1 88 | 34 31 32 1 89 | 35 35 36 1 90 | 36 35 42 2 91 | 37 36 37 1 92 | 38 36 38 2 93 | 39 38 39 1 94 | 40 38 45 1 95 | 41 39 40 1 96 | 42 39 41 2 97 | 43 41 42 1 98 | 44 41 44 1 99 | 45 42 43 1 100 | 46 1 13 1 101 | 47 1 24 1 102 | 48 1 35 1 103 | 104 | @SUBSTRUCTURE 105 | 1 LIG 1 TEMP 0 **** **** 0 ROOT 106 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/tleap.log: -------------------------------------------------------------------------------- 1 | -I: Adding /usr/local/bin/amber20/dat/leap/prep to search path. 2 | -I: Adding /usr/local/bin/amber20/dat/leap/lib to search path. 3 | -I: Adding /usr/local/bin/amber20/dat/leap/parm to search path. 4 | -I: Adding /usr/local/bin/amber20/dat/leap/cmd to search path. 5 | -f: Source LIG_tleap.in. 6 | 7 | Welcome to LEaP! 8 | (no leaprc in search path) 9 | Sourcing: ./LIG_tleap.in 10 | ----- Source: /usr/local/bin/amber20/dat/leap/cmd/leaprc.protein.ff19SB 11 | ----- Source of /usr/local/bin/amber20/dat/leap/cmd/leaprc.protein.ff19SB done 12 | Log file: ./leap.log 13 | Loading parameters: /usr/local/bin/amber20/dat/leap/parm/parm19.dat 14 | Reading title: 15 | PARM99 + frcmod.ff99SB + frcmod.parmbsc0 + OL3 for RNA + ff19SB 16 | Loading parameters: /usr/local/bin/amber20/dat/leap/parm/frcmod.ff19SB 17 | Reading force field modification type file (frcmod) 18 | Reading title: 19 | ff19SB AA-specific backbone CMAPs for protein 07/25/2019 20 | Loading library: /usr/local/bin/amber20/dat/leap/lib/amino19.lib 21 | Loading library: /usr/local/bin/amber20/dat/leap/lib/aminoct12.lib 22 | Loading library: /usr/local/bin/amber20/dat/leap/lib/aminont12.lib 23 | ----- Source: /usr/local/bin/amber20/dat/leap/cmd/leaprc.gaff 24 | ----- Source of /usr/local/bin/amber20/dat/leap/cmd/leaprc.gaff done 25 | Log file: ./leap.log 26 | Loading parameters: /usr/local/bin/amber20/dat/leap/parm/gaff.dat 27 | Reading title: 28 | AMBER General Force Field for organic molecules (Version 1.81, May 2017) 29 | ----- Source: /usr/local/bin/amber20/dat/leap/cmd/leaprc.water.opc 30 | ----- Source of /usr/local/bin/amber20/dat/leap/cmd/leaprc.water.opc done 31 | Loading library: /usr/local/bin/amber20/dat/leap/lib/atomic_ions.lib 32 | Loading library: /usr/local/bin/amber20/dat/leap/lib/solvents.lib 33 | Loading parameters: /usr/local/bin/amber20/dat/leap/parm/frcmod.opc 34 | Reading force field modification type file (frcmod) 35 | Reading title: 36 | Parameters for OPC water (JPCL, 2014, 5 (21), pp 3863–3871) 37 | Loading parameters: /usr/local/bin/amber20/dat/leap/parm/frcmod.ionslm_126_opc 38 | Reading force field modification type file (frcmod) 39 | Reading title: 40 | Li/Merz ion parameters of atomic ions for the OPC water model (12-6 set) 41 | Loading Mol2 file: ./PT1.mol2 42 | Reading MOLECULE named PT1 43 | Loading Mol2 file: ./B1.mol2 44 | Reading MOLECULE named B1 45 | Loading Mol2 file: ./C1.mol2 46 | Reading MOLECULE named C1 47 | Loading Mol2 file: ./D1.mol2 48 | Reading MOLECULE named D1 49 | Loading Mol2 file: ./E1.mol2 50 | Reading MOLECULE named E1 51 | Loading parameters: ./B.frcmod 52 | Reading force field modification type file (frcmod) 53 | Reading title: 54 | Remark line goes here 55 | Loading parameters: ./C.frcmod 56 | Reading force field modification type file (frcmod) 57 | Reading title: 58 | Remark line goes here 59 | Loading parameters: ./D.frcmod 60 | Reading force field modification type file (frcmod) 61 | Reading title: 62 | Remark line goes here 63 | Loading parameters: ./E.frcmod 64 | Reading force field modification type file (frcmod) 65 | Reading title: 66 | Remark line goes here 67 | Loading parameters: /usr/local/bin/amber20/dat/leap/parm/frcmod.ionslm_126_opc 68 | Reading force field modification type file (frcmod) 69 | Reading title: 70 | Li/Merz ion parameters of atomic ions for the OPC water model (12-6 set) 71 | Loading parameters: ./LIG_mcpbpy.frcmod 72 | Reading force field modification type file (frcmod) 73 | Reading title: 74 | REMARK GOES HERE, THIS FILE IS GENERATED BY MCPB.PY 75 | Loading PDB file: ./LIG_mcpbpy.pdb 76 | total atoms in file: 11 77 | Writing pdb file: LIG_dry.pdb 78 | Checking Unit. 79 | Building topology. 80 | Building atom parameters. 81 | Building bond parameters. 82 | Building angle parameters. 83 | Building proper torsion parameters. 84 | Building improper torsion parameters. 85 | total 0 improper torsions applied 86 | Building H-Bond parameters. 87 | Incorporating Non-Bonded adjustments. 88 | Not Marking per-residue atom chain types. 89 | Marking per-residue atom chain types. 90 | (Residues lacking connect0/connect1 - 91 | these don't have chain types marked: 92 | 93 | res total affected 94 | 95 | B1 1 96 | C1 1 97 | ) 98 | (no restraints) 99 | Solute vdw bounding box: 7.998 7.308 6.335 100 | Total bounding box for atom centers: 37.998 37.308 36.335 101 | Solvent unit box: 18.865 18.478 19.006 102 | Total vdw box size: 40.906 40.776 39.490 angstroms. 103 | Volume: 65867.253 A^3 104 | Total mass 28405.008 amu, Density 0.716 g/cc 105 | Added 1560 residues. 106 | 0.000001 0 1 0 107 | 0 Na+ ion required to neutralize. 108 | Adding 0 counter ions to "mol" using 1A grid 109 | 110 | /usr/local/bin/amber20/bin/teLeap: Warning! 111 | addIons: 1st Ion & target unit have charges of the same sign: 112 | unit charge = -1e-06; ion1 charge = -1; 113 | can't neutralize. 114 | Writing pdb file: LIG_solv.pdb 115 | printing CRYST1 record to PDB file with box info 116 | Checking Unit. 117 | 118 | /usr/local/bin/amber20/bin/teLeap: Note. 119 | Ignoring the warnings from Unit Checking. 120 | 121 | Building topology. 122 | Building atom parameters. 123 | Building bond parameters. 124 | Building angle parameters. 125 | Building proper torsion parameters. 126 | Building improper torsion parameters. 127 | total 0 improper torsions applied 128 | Building H-Bond parameters. 129 | Incorporating Non-Bonded adjustments. 130 | Not Marking per-residue atom chain types. 131 | Marking per-residue atom chain types. 132 | (Residues lacking connect0/connect1 - 133 | these don't have chain types marked: 134 | 135 | res total affected 136 | 137 | B1 1 138 | C1 1 139 | ) 140 | (no restraints) 141 | Quit 142 | 143 | Exiting LEaP: Errors = 0; Warnings = 1; Notes = 1. 144 | -------------------------------------------------------------------------------- /tests/TestReference/MCPB_setup/MCPB_s1.out: -------------------------------------------------------------------------------- 1 | ****************************************************************** 2 | * Welcome to use the MCPB.py program * 3 | * Version 7.0 * 4 | * Author: Pengfei Li * 5 | * Merz Research Group * 6 | * Michigan State University * 7 | * AND * 8 | * Hammes-Schiffer Research Group * 9 | * Yale University * 10 | * AND * 11 | * Li Research Group * 12 | * Loyola University Chicago * 13 | ****************************************************************** 14 | The input file you are using is : input.in 15 | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 16 | The following is the input variable you have: 17 | The variable ion_ids is : [1] 18 | The variable ion_info is : [] 19 | The variable ion_mol2files is : ['PT.mol2'] 20 | The variable original_pdb is : Full_PDB.pdb 21 | The variable add_bonded_pairs is : [(1, 10), (1, 11)] 22 | The variable add_redcrd is : 0 23 | The variable additional_resids is : [] 24 | The variable anglefc_avg is : 0 25 | The variable bondfc_avg is : 0 26 | The variable chgfix_resids is : [] 27 | The variable cut_off is : 2.8 28 | The variable force_field is : ff19SB 29 | The variable frcmod_files is : ['B.frcmod', 'C.frcmod', 'D.frcmod', 'E.frcmod'] 30 | The variable gaff is : 1 31 | The variable group_name is : LIG 32 | The variable ion_paraset is : 12_6 (Only for the ions using the nonbonded model). 33 | The variable large_opt is : 0 34 | The variable lgmodel_chg is : -99 35 | The variable lgmodel_spin is : -99 36 | -99 means program will assign a charge automatically. 37 | The variable naa_mol2files is : ['B.mol2', 'C.mol2', 'D.mol2', 'E.mol2'] 38 | The variable scale_factor is : 1.0 39 | ATTENTION: This is the scale factor of frequency. The 40 | force constants will be scaled by multiplying the square 41 | of scale_factor. 42 | The variable smmodel_chg is : -99 43 | The variable smmodel_spin is : -99 44 | -99 means program will assign a charge automatically. 45 | The variable software_version is : g16 46 | The variable sqm_opt is : 0 47 | The variable water_model is : OPC 48 | The variable xstru is : 0 49 | ****************************************************************** 50 | * * 51 | *=======================Metal Site Information===================* 52 | * * 53 | ****************************************************************** 54 | ***Selected Metal ion PT is atom 1 in residue 1-PT 55 | 2-B@N1 is in 2.8 Angstrom of or set bonded (in the input file) to (one of) these metal ions 56 | 3-C@N5 is in 2.8 Angstrom of or set bonded (in the input file) to (one of) these metal ions 57 | 4-D@CL8 is in 2.8 Angstrom of or set bonded (in the input file) to (one of) these metal ions 58 | 5-E@CL9 is in 2.8 Angstrom of or set bonded (in the input file) to (one of) these metal ions 59 | 4-D@CL8 is in 2.8 Angstrom of or set bonded (in the input file) to (one of) these metal ions 60 | 5-E@CL9 is in 2.8 Angstrom of or set bonded (in the input file) to (one of) these metal ions 61 | ***The following residues are in the Metal Site: 62 | Residue 1-PT 63 | Residue 2-B 64 | Residue 3-C 65 | Residue 4-D 66 | Residue 5-E 67 | ***The small model contains the following residues: 68 | [1, 2, 3, 4, 5] 69 | ***The large model contains the following residues: 70 | [1, 2, 3, 4, 5] 71 | ****************************************************************** 72 | * * 73 | *=======================Building models==========================* 74 | * * 75 | ****************************************************************** 76 | ***Creating the small model... 77 | It contains the residue 1-PT as normal. 78 | It contains the residue 2-B as normal. 79 | It contains the residue 3-C as normal. 80 | It contains the residue 4-D as normal. 81 | It contains the residue 5-E as normal. 82 | Totally there are 11 atoms in the small model. 83 | Totally there are 132 electrons in the small model. 84 | ***Creating the standard model... 85 | It contains the residue 1-PT as normal. 86 | It contains the residue 2-B as normal. 87 | It contains the residue 3-C as normal. 88 | It contains the residue 4-D as normal. 89 | It contains the residue 5-E as normal. 90 | Totally there are 11 atoms in the standard model. 91 | ***Creating the large model... 92 | It contains the residue 1-PT as normal. 93 | It contains the residue 2-B as normal. 94 | It contains the residue 3-C as normal. 95 | It contains the residue 4-D as normal. 96 | It contains the residue 5-E as normal. 97 | Totally there are 11 atoms in the large model. 98 | Totally there are 132 electrons in the large model. 99 | ================================================================== 100 | To cite MCPB.py please use the following reference: 101 | Pengfei Li and Kenneth M. Merz, Jr., "MCPB.py: A Python Based 102 | Metal Center Parameter Builder", J. Chem. Inf. Model., 2016, 103 | 56, 599-604. 104 | Helpful tips can be found in the following book chapter: 105 | Pengfei Li and Kenneth M. Merz, Jr., "Parameterization of a Dioxygen 106 | Binding Metal Site Using the MCPB.py Program", Methods Mol. Biol., 107 | 2021, 2199, 257-275. 108 | -------------------------------------------------------------------------------- /src/PyConSolv/interfaces/calculate.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | import subprocess 4 | 5 | from ..utils.colorgen import Color 6 | 7 | 8 | class Calculation: 9 | def __init__(self, path): # 10 | """ 11 | Run ORCA calculations 12 | 13 | Parameters: 14 | - path = path that contains the input file. This will act as the root directory for the calculations. 15 | Geometry optimizations will be performed in path/opt, frequency calculations in path/freq 16 | 17 | Class variables: 18 | - self.orcapath = path to call ORCA executable 19 | - self.path = root path for calculations 20 | - self.original_wd = current working directory when calculations are started 21 | - self.status = status of the calculation. 0 means an error occured and everything should be stopped 22 | """ 23 | self.orcapath = None 24 | self.path = path 25 | self.original_wd = os.getcwd() 26 | self.status = 0 27 | 28 | def checkpath(self): 29 | """ 30 | Check if ORCA is available in PATH 31 | 32 | Parameters: 33 | 34 | Class variables: 35 | """ 36 | self.status = 0 37 | self.orcapath = '' 38 | systemPATH = os.environ.get('PATH', '').split(os.pathsep) 39 | for el in systemPATH: 40 | if 'orca' in el or 'ORCA' in el: 41 | print('Found ORCA in: ' + el) 42 | self.orcapath = el + '/orca ' 43 | self.status = 1 44 | break 45 | if self.orcapath == '': 46 | print(Color.RED + 'ORCA was not found on your system... is it in your PATH?' + Color.END) 47 | self.status = 0 48 | return 49 | else: 50 | return 51 | 52 | def calculate(self, calctype: str, calcpath: str = ''): 53 | """ 54 | Run orca calculations 55 | 56 | Parameters: 57 | - calctype = type of calculation, sp, opt or freq 58 | 59 | Class variables: 60 | """ 61 | if calcpath != '': 62 | loc = calcpath 63 | else: 64 | loc = '/'+calctype 65 | if calctype == 'opt': 66 | output = 'orca_opt.out' 67 | inputfile = 'orca_opt.inp' 68 | os.chdir(self.path + loc) 69 | print('Running geometry optimization in ' + os.getcwd()) 70 | elif calctype == 'sp': 71 | loc = '/opt' 72 | output = 'orca_opt.out' 73 | inputfile = 'orca_opt.inp' 74 | os.chdir(self.path + loc) 75 | shutil.copyfile(self.path + loc + '/input.xyz', 76 | self.path + loc + '/orca_opt.xyz') 77 | print('Running single point calculation in ' + os.getcwd()) 78 | elif calctype == 'freq': 79 | output = 'orca_freq.out' 80 | inputfile = 'orca_freq.inp' 81 | os.chdir(self.path + loc) 82 | print('Running frequency calculation in ' + os.getcwd()) 83 | shutil.copyfile(self.path + '/opt/orca_opt.xyz', self.path + '/freq/input.xyz') 84 | else: 85 | print(Color.RED + 'Unrecognized keyword for calculation!' + Color.END) 86 | self.status = 0 87 | return 88 | 89 | command = self.orcapath + inputfile + ' > ' + output 90 | print(command) 91 | f = open('run_calc.sh', 'w') 92 | f.write('#!/bin/bash\n') 93 | f.write(command) 94 | f.close() 95 | script = './run_calc.sh' 96 | subprocess.run(['chmod u+x run_calc.sh'], shell=True) 97 | calc = subprocess.run([script], stdin=None) 98 | if calc.returncode == 0: 99 | print(''' 100 | 101 | Calculation completed successfully! 102 | Moving on! 103 | 104 | ''') 105 | print('Generating molden input file from calculation..\n') 106 | if calctype == 'freq': 107 | command = 'orca_2mkl orca_freq -molden' 108 | else: 109 | command = 'orca_2mkl orca_opt -molden' 110 | calc = subprocess.run([command], shell=True) 111 | if calc.returncode == 0: 112 | self.status = 1 113 | else: 114 | print(Color.RED + 'Could not create molden input file...\n' + Color.END) 115 | self.status = 0 116 | os.chdir(self.original_wd) 117 | return 118 | 119 | else: 120 | print( 121 | Color.RED + 'Something went wrong with the ORCA calculation, please check output files in ' 122 | + os.getcwd() + Color.END) 123 | os.chdir(self.original_wd) 124 | self.status = 0 125 | return 126 | 127 | def run(self,freq: bool = True, opt: bool = True) -> int: 128 | """ 129 | Run all ORCA calculations 130 | 131 | Parameters: 132 | - freq: bool, when True, frequency calculations are also run 133 | 134 | Class variables: 135 | 136 | """ 137 | if not opt: 138 | print('Geometry optimization will not be performed, only a single point energy calculation\n') 139 | self.checkpath() 140 | if self.status == 0: 141 | print(Color.RED + 'Aborting calculation!' + Color.END) 142 | return self.status 143 | if opt: 144 | self.calculate(calctype='opt') 145 | else: 146 | self.calculate(calctype='sp') 147 | 148 | if self.status == 0: 149 | print(Color.RED + 'Aborting calculation!' + Color.END) 150 | return self.status 151 | if freq: 152 | self.calculate(calctype='freq') 153 | if self.status == 0: 154 | print(Color.RED + 'Aborting calculation!' + Color.END) 155 | return self.status 156 | print('ORCA calculations completed successfully!\n') 157 | os.chdir(self.original_wd) 158 | return self.status 159 | -------------------------------------------------------------------------------- /tests/TestReference/orca_calculations/opt/orca_opt_trj.xyz: -------------------------------------------------------------------------------- 1 | 11 2 | Coordinates from ORCA-job orca_opt E -1152.930625214452 3 | Pt -2.872000 0.147000 0.175000 4 | N -0.890000 0.636000 0.536000 5 | H -0.770000 1.545000 1.010000 6 | H -0.312000 0.658000 -0.318000 7 | H -0.492000 -0.090000 1.158000 8 | N -3.192000 1.807000 -1.026000 9 | H -3.053000 2.702000 -0.532000 10 | H -4.175000 1.781000 -1.348000 11 | H -2.593000 1.825000 -1.866000 12 | Cl -2.481000 -1.719000 1.540000 13 | Cl -5.116000 -0.382000 -0.253000 14 | 11 15 | Coordinates from ORCA-job orca_opt E -1152.930496413901 16 | Pt -2.884441 0.161996 0.204286 17 | N -0.899232 0.643405 0.531718 18 | H -0.769854 1.554517 0.999325 19 | H -0.336036 0.662364 -0.333180 20 | H -0.490439 -0.079394 1.148480 21 | N -3.183000 1.804752 -1.016751 22 | H -3.039612 2.704525 -0.531686 23 | H -4.162403 1.785547 -1.348813 24 | H -2.574934 1.808432 -1.850750 25 | Cl -2.480100 -1.739117 1.539579 26 | Cl -5.125949 -0.397027 -0.266208 27 | 11 28 | Coordinates from ORCA-job orca_opt E -1152.927056946462 29 | Pt -2.864523 0.076203 0.109813 30 | N -0.942194 0.669521 0.489648 31 | H -0.889165 1.595793 0.943215 32 | H -0.362569 0.723903 -0.368230 33 | H -0.491079 -0.006422 1.119364 34 | N -3.125811 1.773709 -0.995332 35 | H -2.946810 2.636664 -0.452619 36 | H -4.099237 1.821731 -1.335598 37 | H -2.508232 1.812303 -1.823367 38 | Cl -2.504448 -1.790925 1.610278 39 | Cl -5.211930 -0.402480 -0.221172 40 | 11 41 | Coordinates from ORCA-job orca_opt E -1152.930680647066 42 | Pt -2.873966 0.130884 0.166062 43 | N -0.900476 0.641549 0.527611 44 | H -0.794714 1.556085 0.994912 45 | H -0.325284 0.670816 -0.329355 46 | H -0.485268 -0.071671 1.151010 47 | N -3.180028 1.800627 -1.019773 48 | H -3.030167 2.689077 -0.515627 49 | H -4.160264 1.795463 -1.349750 50 | H -2.574416 1.821320 -1.855613 51 | Cl -2.493444 -1.730910 1.549483 52 | Cl -5.127973 -0.393240 -0.242960 53 | 11 54 | Coordinates from ORCA-job orca_opt E -1152.930700435197 55 | Pt -2.880629 0.142278 0.183702 56 | N -0.903985 0.645901 0.531077 57 | H -0.792688 1.559700 0.998353 58 | H -0.335923 0.675316 -0.330515 59 | H -0.484060 -0.068191 1.150048 60 | N -3.177538 1.797793 -1.019600 61 | H -3.025887 2.690683 -0.524102 62 | H -4.156085 1.794307 -1.354087 63 | H -2.568398 1.807602 -1.852956 64 | Cl -2.486701 -1.746555 1.530468 65 | Cl -5.134106 -0.388835 -0.236387 66 | 11 67 | Coordinates from ORCA-job orca_opt E -1152.927130130671 68 | Pt -2.895038 0.167854 0.220431 69 | N -0.891357 0.608109 0.472393 70 | H -0.731060 1.539841 0.886541 71 | H -0.356926 0.574093 -0.410041 72 | H -0.468873 -0.086478 1.110786 73 | N -3.197371 1.836808 -0.953709 74 | H -3.089573 2.720855 -0.431977 75 | H -4.160238 1.819520 -1.329412 76 | H -2.555718 1.883661 -1.760707 77 | Cl -2.574130 -1.593409 1.756115 78 | Cl -5.025714 -0.560854 -0.484420 79 | 11 80 | Coordinates from ORCA-job orca_opt E -1152.930701420547 81 | Pt -2.880945 0.138494 0.181860 82 | N -0.900760 0.639909 0.523314 83 | H -0.786112 1.557039 0.983335 84 | H -0.335218 0.661702 -0.340169 85 | H -0.479628 -0.069839 1.146467 86 | N -3.180837 1.803532 -1.012411 87 | H -3.035467 2.693083 -0.508968 88 | H -4.157267 1.799854 -1.353065 89 | H -2.567112 1.822728 -1.842327 90 | Cl -2.499536 -1.725127 1.564310 91 | Cl -5.123118 -0.411374 -0.266347 92 | 11 93 | Coordinates from ORCA-job orca_opt E -1152.930721024544 94 | Pt -2.878847 0.138190 0.178807 95 | N -0.903995 0.642899 0.527151 96 | H -0.793639 1.558669 0.990880 97 | H -0.336165 0.669657 -0.334683 98 | H -0.482057 -0.067664 1.148853 99 | N -3.178450 1.798821 -1.016394 100 | H -3.030969 2.689114 -0.514952 101 | H -4.155398 1.796243 -1.355516 102 | H -2.566111 1.815333 -1.847336 103 | Cl -2.493384 -1.736086 1.543874 104 | Cl -5.126984 -0.395175 -0.244682 105 | 11 106 | Coordinates from ORCA-job orca_opt E -1152.930723059435 107 | Pt -2.880228 0.136760 0.179372 108 | N -0.901685 0.642726 0.528466 109 | H -0.791757 1.558421 0.992498 110 | H -0.333950 0.670204 -0.333437 111 | H -0.478599 -0.067542 1.149801 112 | N -3.179633 1.800169 -1.018023 113 | H -3.030830 2.690458 -0.516881 114 | H -4.156701 1.799288 -1.356942 115 | H -2.567664 1.815869 -1.849295 116 | Cl -2.493965 -1.738665 1.544375 117 | Cl -5.130988 -0.397690 -0.243935 118 | 11 119 | Coordinates from ORCA-job orca_opt E -1152.930725344700 120 | Pt -2.880068 0.137206 0.179639 121 | N -0.902879 0.642464 0.527247 122 | H -0.792686 1.558422 0.990672 123 | H -0.335635 0.669382 -0.334987 124 | H -0.479419 -0.067389 1.148734 125 | N -3.179066 1.799951 -1.016524 126 | H -3.029951 2.690024 -0.515091 127 | H -4.156071 1.799673 -1.355530 128 | H -2.567049 1.815680 -1.847756 129 | Cl -2.494555 -1.735921 1.546823 130 | Cl -5.128622 -0.399492 -0.247228 131 | 11 132 | Coordinates from ORCA-job orca_opt E -1152.930725460712 133 | Pt -2.880097 0.137115 0.179582 134 | N -0.902957 0.642540 0.527260 135 | H -0.793048 1.558516 0.990731 136 | H -0.335736 0.669677 -0.334984 137 | H -0.479046 -0.067106 1.148699 138 | N -3.179044 1.799738 -1.016538 139 | H -3.029978 2.689802 -0.515079 140 | H -4.155915 1.799800 -1.355920 141 | H -2.566813 1.815405 -1.847614 142 | Cl -2.494743 -1.736488 1.546479 143 | Cl -5.128625 -0.398997 -0.246616 144 | --------------------------------------------------------------------------------