diff --git a/utils/process-mdout-plugin/.bumpversion.cfg b/utils/molecular-dynamics/amber/process-mdout-tool/.bumpversion.cfg similarity index 100% rename from utils/process-mdout-plugin/.bumpversion.cfg rename to utils/molecular-dynamics/amber/process-mdout-tool/.bumpversion.cfg diff --git a/utils/process-mdout-plugin/.dockerignore b/utils/molecular-dynamics/amber/process-mdout-tool/.dockerignore similarity index 100% rename from utils/process-mdout-plugin/.dockerignore rename to utils/molecular-dynamics/amber/process-mdout-tool/.dockerignore diff --git a/utils/molecular-dynamics/amber/process-mdout-tool/.gitattributes b/utils/molecular-dynamics/amber/process-mdout-tool/.gitattributes new file mode 100644 index 00000000..9d4b5349 --- /dev/null +++ b/utils/molecular-dynamics/amber/process-mdout-tool/.gitattributes @@ -0,0 +1 @@ +*.log filter=lfs diff=lfs merge=lfs -text diff --git a/utils/process-mdout-plugin/.gitignore b/utils/molecular-dynamics/amber/process-mdout-tool/.gitignore similarity index 100% rename from utils/process-mdout-plugin/.gitignore rename to utils/molecular-dynamics/amber/process-mdout-tool/.gitignore diff --git a/utils/process-mdout-plugin/CHANGELOG.md b/utils/molecular-dynamics/amber/process-mdout-tool/CHANGELOG.md similarity index 100% rename from utils/process-mdout-plugin/CHANGELOG.md rename to utils/molecular-dynamics/amber/process-mdout-tool/CHANGELOG.md diff --git a/utils/process-mdout-plugin/README.md b/utils/molecular-dynamics/amber/process-mdout-tool/README.md similarity index 100% rename from utils/process-mdout-plugin/README.md rename to utils/molecular-dynamics/amber/process-mdout-tool/README.md diff --git a/utils/process-mdout-plugin/VERSION b/utils/molecular-dynamics/amber/process-mdout-tool/VERSION similarity index 100% rename from utils/process-mdout-plugin/VERSION rename to utils/molecular-dynamics/amber/process-mdout-tool/VERSION diff --git a/utils/process-mdout-plugin/ict.yml b/utils/molecular-dynamics/amber/process-mdout-tool/ict.yml similarity index 95% rename from utils/process-mdout-plugin/ict.yml rename to utils/molecular-dynamics/amber/process-mdout-tool/ict.yml index 7f62f57c..23178407 100644 --- a/utils/process-mdout-plugin/ict.yml +++ b/utils/molecular-dynamics/amber/process-mdout-tool/ict.yml @@ -1,12 +1,12 @@ specVersion: "0.1.0" name: process_mdout version: 0.1.0 -container: process-mdout-plugin +container: process-mdout-tool entrypoint: title: process_mdout description: Wrapper of the AmberTools (AMBER MD Package) process_mdout tool module. -author: Data Scientist -contact: data.scientist@labshare.org +author: Brandon Walker, Nazanin Donyapour +contact: brandon.walker@axleinfo.com, nazanin.donyapour@axleinfo.com repository: documentation: citation: diff --git a/utils/process-mdout-plugin/process_mdout.cwl b/utils/molecular-dynamics/amber/process-mdout-tool/process_mdout_0@1@0.cwl similarity index 100% rename from utils/process-mdout-plugin/process_mdout.cwl rename to utils/molecular-dynamics/amber/process-mdout-tool/process_mdout_0@1@0.cwl diff --git a/utils/process-mdout-plugin/pyproject.toml b/utils/molecular-dynamics/amber/process-mdout-tool/pyproject.toml similarity index 92% rename from utils/process-mdout-plugin/pyproject.toml rename to utils/molecular-dynamics/amber/process-mdout-tool/pyproject.toml index 2a1a69fd..7ee3d5b6 100644 --- a/utils/process-mdout-plugin/pyproject.toml +++ b/utils/molecular-dynamics/amber/process-mdout-tool/pyproject.toml @@ -8,8 +8,7 @@ readme = "README.md" [tool.poetry.dependencies] python = ">=3.9,<3.12" typer = "^0.7.0" -cwl-utils = "0.33" -cwltool = "3.1.20240404144621" +sophios = "0.1.1" [tool.poetry.group.dev.dependencies] bump2version = "^1.0.1" diff --git a/utils/process-mdout-plugin/tests/__init__.py b/utils/molecular-dynamics/amber/process-mdout-tool/tests/__init__.py similarity index 100% rename from utils/process-mdout-plugin/tests/__init__.py rename to utils/molecular-dynamics/amber/process-mdout-tool/tests/__init__.py diff --git a/utils/molecular-dynamics/amber/process-mdout-tool/tests/sander.heat.log b/utils/molecular-dynamics/amber/process-mdout-tool/tests/sander.heat.log new file mode 100644 index 00000000..c01e1555 --- /dev/null +++ b/utils/molecular-dynamics/amber/process-mdout-tool/tests/sander.heat.log @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61ba1971ccc38da08f9e8b5761a41d21ce585f9c760a774c0868a3c35d6beb0a +size 15377 diff --git a/utils/molecular-dynamics/amber/process-mdout-tool/tests/test_process_mdout.py b/utils/molecular-dynamics/amber/process-mdout-tool/tests/test_process_mdout.py new file mode 100644 index 00000000..266aaea0 --- /dev/null +++ b/utils/molecular-dynamics/amber/process-mdout-tool/tests/test_process_mdout.py @@ -0,0 +1,30 @@ +"""Tests for process_mdout.""" +from pathlib import Path + +from sophios.api.pythonapi import Step +from sophios.api.pythonapi import Workflow + + +def test_process_mdout() -> None: + """Test process_mdout CWL.""" + cwl_file_str = "process_mdout_0@1@0.cwl" + cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) + + input_log_path = Path(__file__).resolve().parent / Path("sander.heat.log") + + process_mdout = Step(clt_path=cwl_file) + process_mdout.input_log_path = input_log_path + process_mdout.output_dat_path = "system.dat" + + steps = [process_mdout] + filename = "process_mdout" + viz = Workflow(steps, filename) + + viz.run() + + outdir = Path("outdir") + output_files = list(outdir.rglob("system.dat")) + + assert ( + output_files + ), f"The file 'system.dat' does not exist in any subdirectory of '{outdir}'." diff --git a/utils/process-mdout-plugin/tests/sander.heat.log b/utils/process-mdout-plugin/tests/sander.heat.log deleted file mode 100644 index 53c3d806..00000000 --- a/utils/process-mdout-plugin/tests/sander.heat.log +++ /dev/null @@ -1,350 +0,0 @@ - - ------------------------------------------------------- - Amber 20 SANDER 2020 - ------------------------------------------------------- - -| Run on 01/13/2021 at 13:35:06 - -| Executable path: sander -| Working directory: /Users/hospital/biobb_tutorials/biobb_amber/biobb_amber/notebooks/biobb_amber_notebook -| Hostname: Unknown - [-O]verwriting output - -File Assignments: -| MDIN: 8d0f2445-987f-4bc0-91f2-3047c327a2c6/sander.mdin -| MDOUT: sander.heat.log -|INPCRD: sander.min.rst -| PARM: structure.ions.parmtop -|RESTRT: sander.heat.rst -| REFC: refc -| MDVEL: mdvel -| MDFRC: mdfrc -| MDEN: mden -| MDCRD: sander.heat.x -|MDINFO: mdinfo -| MTMD: mtmd -|INPDIP: inpdip -|RSTDIP: rstdip -|INPTRA: inptraj - - - Here is the input file: - -This mdin file has been created by the biobb_amber module from the BioBB library -Type of mdin: heat -&cntrl - tempi = 0.0 - temp0 = 300.0 - irest = 0 - ntb = 1 - cut = 10.0 - ntr = 0 - ntc = 2 - ntf = 2 - ntt = 3 - ig = -1 - ioutfm = 1 - iwrap = 1 - gamma_ln = 1.0 - nstlim = 500 - dt = 0.004 -&end - --------------------------------------------------------------------------------- - 1. RESOURCE USE: --------------------------------------------------------------------------------- - -| Flags: - getting box info from netcdf restart file -| NetCDF restart box info found -|Largest sphere to fit in unit cell has radius = 35.190 -| New format PARM file being parsed. -| Version = 1.000 Date = 01/13/21 Time = 12:26:09 - NATOM = 43997 NTYPES = 19 NBONH = 43024 MBONA = 958 - NTHETH = 1123 MTHETA = 1475 NPHIH = 2225 MPHIA = 2840 - NHPARM = 0 NPARM = 0 NNB = 64249 NRES = 14343 - NBONA = 958 NTHETA = 1475 NPHIA = 2840 NUMBND = 52 - NUMANG = 103 NPTRA = 66 NATYP = 33 NPHB = 1 - IFBOX = 1 NMXRS = 33 IFCAP = 0 NEXTRA = 0 - NCOPY = 0 - - -| Memory Use Allocated -| Real 3490482 -| Hollerith 146336 -| Integer 1268486 -| Max Pairs 25342272 -| nblistReal 527964 -| nblist Int 1437420 -| Total 141528 kbytes - -| Note: 1-4 EEL scale factors are being read from the topology file. - -| Note: 1-4 VDW scale factors are being read from the topology file. -| Duplicated 0 dihedrals -| Duplicated 0 dihedrals - - BOX TYPE: RECTILINEAR -Note: ig = -1. Setting random seed to 81481 based on wallclock time in microseconds. - --------------------------------------------------------------------------------- - 2. CONTROL DATA FOR THE RUN --------------------------------------------------------------------------------- - -default_name - -General flags: - imin = 0, nmropt = 0 - -Nature and format of input: - ntx = 1, irest = 0, ntrx = 1 - -Nature and format of output: - ntxo = 2, ntpr = 50, ntrx = 1, ntwr = 500 - iwrap = 1, ntwx = 0, ntwv = 0, ntwe = 0 - ioutfm = 1, ntwprt = 0, idecomp = 0, rbornstat= 0 - -Potential function: - ntf = 2, ntb = 1, igb = 0, nsnb = 25 - ipol = 0, gbsa = 0, iesp = 0 - dielc = 1.00000, cut = 10.00000, intdiel = 1.00000 - -Frozen or restrained atoms: - ibelly = 0, ntr = 0 - -Molecular dynamics: - nstlim = 500, nscm = 1000, nrespa = 1 - t = 0.00000, dt = 0.00400, vlimit = 20.00000 - -Langevin dynamics temperature regulation: - ig = 81481 - temp0 = 300.00000, tempi = 0.00000, gamma_ln= 1.00000 - -SHAKE: - ntc = 2, jfastw = 0 - tol = 0.00001 - -Ewald parameters: - verbose = 0, ew_type = 0, nbflag = 1, use_pme = 1 - vdwmeth = 1, eedmeth = 1, netfrc = 1 - Box X = 86.194 Box Y = 86.194 Box Z = 86.194 - Alpha = 109.470 Beta = 109.470 Gamma = 109.470 - NFFT1 = 90 NFFT2 = 90 NFFT3 = 90 - Cutoff= 10.000 Tol =0.100E-04 - Ewald Coefficient = 0.27511 - Interpolation order = 4 - Setting ifbox to 3 for non-orthogonal unit cell -| INFO: Old style inpcrd file read - - --------------------------------------------------------------------------------- - 3. ATOMIC COORDINATES AND VELOCITIES --------------------------------------------------------------------------------- - -default_name - begin time read from input coords = 0.000 ps - - Number of triangulated 3-point waters found: 14183 - - Sum of charges from parm topology file = 0.00000024 - Forcing neutrality... - --------------------------------------------------------------------------------- - 4. RESULTS --------------------------------------------------------------------------------- - -| # of SOLUTE degrees of freedom (RNDFP): 88967. -| # of SOLVENT degrees of freedom (RNDFS): 0. -| NDFMIN = 88967. NUM_NOSHAKE = 0 CORRECTED RNDFP = 88967. -| TOTAL # of degrees of freedom (RNDF) = 88967. - --------------------------------------------------- - APPROXIMATING switch and d/dx switch using CUBIC SPLINE INTERPOLATION - using 5000.0 points per unit in tabled values - TESTING RELATIVE ERROR over r ranging from 0.0 to cutoff -| CHECK switch(x): max rel err = 0.2738E-14 at 2.422500 -| CHECK d/dx switch(x): max rel err = 0.8314E-11 at 2.736960 - --------------------------------------------------- -| Local SIZE OF NONBOND LIST = 14246871 -| TOTAL SIZE OF NONBOND LIST = 14246871 - - NSTEP = 0 TIME(PS) = 0.000 TEMP(K) = 0.00 PRESS = 0.0 - Etot = -202065.5083 EKtot = 0.0000 EPtot = -202065.5083 - BOND = 69.2845 ANGLE = 260.5108 DIHED = 945.1900 - 1-4 NB = 296.3760 1-4 EEL = -4875.4706 VDWAALS = 29396.3311 - EELEC = -228157.7300 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.2584E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 50 TIME(PS) = 0.200 TEMP(K) = 83.32 PRESS = 0.0 - Etot = -167246.1276 EKtot = 7364.9590 EPtot = -174611.0866 - BOND = 121.9436 ANGLE = 343.9182 DIHED = 985.7171 - 1-4 NB = 309.6249 1-4 EEL = -4859.8433 VDWAALS = 24434.1998 - EELEC = -195946.6471 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.1814E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 100 TIME(PS) = 0.400 TEMP(K) = 130.55 PRESS = 0.0 - Etot = -160345.2726 EKtot = 11539.9621 EPtot = -171885.2347 - BOND = 186.9622 ANGLE = 448.4867 DIHED = 999.1665 - 1-4 NB = 313.0321 1-4 EEL = -4840.6923 VDWAALS = 25715.8898 - EELEC = -194708.0797 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.1849E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 150 TIME(PS) = 0.600 TEMP(K) = 162.18 PRESS = 0.0 - Etot = -154928.0673 EKtot = 14336.1549 EPtot = -169264.2222 - BOND = 221.3321 ANGLE = 509.8466 DIHED = 1033.0149 - 1-4 NB = 320.0699 1-4 EEL = -4854.1056 VDWAALS = 24789.5152 - EELEC = -191283.8953 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.3468E-06 - ------------------------------------------------------------------------------ - - - NSTEP = 200 TIME(PS) = 0.800 TEMP(K) = 188.30 PRESS = 0.0 - Etot = -150366.6429 EKtot = 16645.2157 EPtot = -167011.8586 - BOND = 270.8950 ANGLE = 533.2469 DIHED = 1038.4629 - 1-4 NB = 329.8098 1-4 EEL = -4827.2387 VDWAALS = 24485.6648 - EELEC = -188842.6995 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.4859E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 250 TIME(PS) = 1.000 TEMP(K) = 207.10 PRESS = 0.0 - Etot = -146870.8118 EKtot = 18307.2819 EPtot = -165178.0937 - BOND = 286.6899 ANGLE = 598.4084 DIHED = 1037.1397 - 1-4 NB = 334.1472 1-4 EEL = -4819.3669 VDWAALS = 23489.1913 - EELEC = -186104.3033 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.8404E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 300 TIME(PS) = 1.200 TEMP(K) = 222.57 PRESS = 0.0 - Etot = -143614.6049 EKtot = 19674.6680 EPtot = -163289.2729 - BOND = 294.4978 ANGLE = 651.2546 DIHED = 1066.5150 - 1-4 NB = 341.0875 1-4 EEL = -4825.7208 VDWAALS = 22889.3085 - EELEC = -183706.2156 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.2478E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 350 TIME(PS) = 1.400 TEMP(K) = 232.83 PRESS = 0.0 - Etot = -141148.6235 EKtot = 20581.4634 EPtot = -161730.0869 - BOND = 325.7541 ANGLE = 694.2308 DIHED = 1046.6140 - 1-4 NB = 331.5619 1-4 EEL = -4819.2181 VDWAALS = 22521.3635 - EELEC = -181830.3929 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.1636E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 400 TIME(PS) = 1.600 TEMP(K) = 244.63 PRESS = 0.0 - Etot = -138792.3651 EKtot = 21624.7485 EPtot = -160417.1136 - BOND = 346.8029 ANGLE = 699.4209 DIHED = 1078.0842 - 1-4 NB = 334.0925 1-4 EEL = -4868.0566 VDWAALS = 22168.6827 - EELEC = -180176.1403 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.2776E-04 - ------------------------------------------------------------------------------ - - - NSTEP = 450 TIME(PS) = 1.800 TEMP(K) = 252.76 PRESS = 0.0 - Etot = -137005.4405 EKtot = 22343.7060 EPtot = -159349.1466 - BOND = 380.9471 ANGLE = 723.1476 DIHED = 1071.5813 - 1-4 NB = 342.0742 1-4 EEL = -4840.3591 VDWAALS = 21508.9454 - EELEC = -178535.4831 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.2307E-04 - ------------------------------------------------------------------------------ - -wrapping first mol.: -57.46440 -81.26509 0.00000 - - NSTEP = 500 TIME(PS) = 2.000 TEMP(K) = 259.01 PRESS = 0.0 - Etot = -135347.1536 EKtot = 22895.8149 EPtot = -158242.9686 - BOND = 331.7214 ANGLE = 726.1341 DIHED = 1075.6003 - 1-4 NB = 338.0647 1-4 EEL = -4833.4529 VDWAALS = 21400.7405 - EELEC = -177281.7766 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.4638E-04 - ------------------------------------------------------------------------------ - - - A V E R A G E S O V E R 500 S T E P S - - - NSTEP = 500 TIME(PS) = 2.000 TEMP(K) = 186.45 PRESS = 0.0 - Etot = -149538.6927 EKtot = 16481.3084 EPtot = -166020.0011 - BOND = 264.0147 ANGLE = 571.0609 DIHED = 1040.0786 - 1-4 NB = 331.3318 1-4 EEL = -4850.4129 VDWAALS = 23595.1619 - EELEC = -186971.2362 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.4385E-04 - ------------------------------------------------------------------------------ - - - R M S F L U C T U A T I O N S - - - NSTEP = 500 TIME(PS) = 2.000 TEMP(K) = 64.65 PRESS = 0.0 - Etot = 11299.7208 EKtot = 5714.7500 EPtot = 5718.1280 - BOND = 85.0215 ANGLE = 136.7802 DIHED = 37.3233 - 1-4 NB = 14.9146 1-4 EEL = 19.2171 VDWAALS = 1597.8056 - EELEC = 6919.5187 EHBOND = 0.0000 RESTRAINT = 0.0000 - Ewald error estimate: 0.3503E-04 - ------------------------------------------------------------------------------ - - --------------------------------------------------------------------------------- - 5. TIMINGS --------------------------------------------------------------------------------- - -| Build the list 204.02 (99.77% of List ) -| Other 0.47 ( 0.23% of List ) -| List time 204.49 (22.40% of Nonbo) -| Short_ene time 642.60 (99.41% of Direc) -| Other 3.80 ( 0.59% of Direc) -| Direct Ewald time 646.40 (91.25% of Ewald) -| Adjust Ewald time 1.13 ( 0.16% of Ewald) -| Fill Bspline coeffs 1.68 ( 2.77% of Recip) -| Fill charge grid 7.65 (12.63% of Recip) -| Scalar sum 14.84 (24.50% of Recip) -| Grad sum 12.28 (20.28% of Recip) -| FFT time 24.11 (39.82% of Recip) -| Recip Ewald time 60.55 ( 8.55% of Ewald) -| Force Adjust 0.07 ( 0.01% of Ewald) -| Virial junk 0.15 ( 0.02% of Ewald) -| Other 0.07 ( 0.01% of Ewald) -| Ewald time 708.37 (77.60% of Nonbo) -| Nonbond force 912.86 (100.0% of Force) -| Bond/Angle/Dihedral 0.59 ( 0.07% of Force) -| Other 0.06 ( 0.01% of Force) -| Force time 913.51 (98.63% of Runmd) -| Shake time 1.42 ( 0.15% of Runmd) -| Verlet update time 11.14 ( 1.20% of Runmd) -| Other 0.14 ( 0.02% of Runmd) -| Runmd Time 926.22 (99.88% of Total) -| Other 1.07 ( 0.12% of Total) -| Total time 927.30 (100.0% of ALL ) - -| Number of list builds : 81 - -| Highest rstack allocated: 2736661 -| Highest istack allocated: 43997 - -| Final Performance Info: -| ----------------------------------------------------- -| Average timings for all steps: -| Elapsed(s) = 926.22 Per Step(ms) = 1852.45 -| ns/day = 0.19 seconds/ns = 463112.31 -| ----------------------------------------------------- - -| Job began at 13:35:06.026 on 01/13/2021 -| Setup done at 13:35:07.115 on 01/13/2021 -| Run done at 13:50:33.333 on 01/13/2021 -| wallclock() was called 22223 times - -|3D-RISM memory allocation summary -|Type Maximum Current -|Integer 0.00000 GB 0.00000 GB -|Real 0.00000 GB 0.00000 GB -|Logical 0.00000 GB 0.00000 GB -|Character 0.00000 GB 0.00000 GB -|--------------------------------------- -|Total 0.00000 GB 0.00000 GB diff --git a/utils/process-mdout-plugin/tests/test_process_mdout.py b/utils/process-mdout-plugin/tests/test_process_mdout.py deleted file mode 100644 index 98cf7bca..00000000 --- a/utils/process-mdout-plugin/tests/test_process_mdout.py +++ /dev/null @@ -1,27 +0,0 @@ -"""Tests for process_mdout.""" -import sys -from pathlib import Path - -current_dir = Path(__file__).resolve().parent -target_dir = current_dir.parent.parent.parent / "cwl_utils" -sys.path.append(str(target_dir)) - -from cwl_utilities import call_cwltool # noqa: E402 -from cwl_utilities import create_input_yaml # noqa: E402 -from cwl_utilities import parse_cwl_arguments # noqa: E402 - - -def test_process_mdout() -> None: - """Test process_mdout.""" - cwl_file_str = "process_mdout.cwl" - cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) - input_to_props = parse_cwl_arguments(cwl_file) - file_path_str = "sander.heat.log" - file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) - input_to_props["input_log_path"]["path"] = file_path - - input_yaml_path = Path("process_mdout.yml") - create_input_yaml(input_to_props, input_yaml_path) - - stdout, stderr = call_cwltool(cwl_file, input_yaml_path) - assert Path("system.dat").exists()