HTPolyNet 1.0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- htpolynet-1.0.7.2/.github/workflows/sphinx.yml +31 -0
- htpolynet-1.0.7.2/.gitignore +137 -0
- htpolynet-1.0.7.2/HTPolyNet/__init__.py +1 -0
- htpolynet-1.0.7.2/HTPolyNet/ambertools.py +94 -0
- htpolynet-1.0.7.2/HTPolyNet/analyze.py +258 -0
- htpolynet-1.0.7.2/HTPolyNet/banner.py +26 -0
- htpolynet-1.0.7.2/HTPolyNet/bondlist.py +206 -0
- htpolynet-1.0.7.2/HTPolyNet/bondtemplate.py +111 -0
- htpolynet-1.0.7.2/HTPolyNet/checkpoint.py +88 -0
- htpolynet-1.0.7.2/HTPolyNet/command.py +42 -0
- htpolynet-1.0.7.2/HTPolyNet/configuration.py +240 -0
- htpolynet-1.0.7.2/HTPolyNet/coordinates.py +1071 -0
- htpolynet-1.0.7.2/HTPolyNet/countTime.py +26 -0
- htpolynet-1.0.7.2/HTPolyNet/curecontroller.py +767 -0
- htpolynet-1.0.7.2/HTPolyNet/dataframetools.py +130 -0
- htpolynet-1.0.7.2/HTPolyNet/driver.py +250 -0
- htpolynet-1.0.7.2/HTPolyNet/expandreactions.py +154 -0
- htpolynet-1.0.7.2/HTPolyNet/gromacs.py +333 -0
- htpolynet-1.0.7.2/HTPolyNet/inputcheck.py +51 -0
- htpolynet-1.0.7.2/HTPolyNet/linkcell.py +322 -0
- htpolynet-1.0.7.2/HTPolyNet/molecule.py +1279 -0
- htpolynet-1.0.7.2/HTPolyNet/plot.py +607 -0
- htpolynet-1.0.7.2/HTPolyNet/postsim.py +444 -0
- htpolynet-1.0.7.2/HTPolyNet/projectfilesystem.py +483 -0
- htpolynet-1.0.7.2/HTPolyNet/reaction.py +282 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/README.md +20 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/__init__.py +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/DGE-PAC-hi.yaml +115 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/DGE-PAC-lo.yaml +115 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/FDE-DFDA-hi.yaml +116 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/FDE-DFDA-lo.yaml +116 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/GMASTY-hi.yaml +158 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/GMASTY-lo.yaml +158 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/README.md +1 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/STY.yaml +23 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/pMSTY-hi.yaml +101 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/pMSTY-lo.yaml +101 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/pSTY-hi.yaml +101 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/cfg/pSTY-lo.yaml +101 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/example_depot/0-liquid-styrene.tgz +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/example_depot/1-polystyrene.tgz +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/example_depot/2-polymethylstyrene.tgz +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/example_depot/3-bisgma-styrene-thermoset.tgz +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/example_depot/4-pacm-dgeba-epoxy-thermoset.tgz +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/example_depot/5-dfda-fde-epoxy-thermoset.tgz +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/README.md +1 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/drag-min.mdp +13 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/drag-npt.mdp +36 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/drag-nvt.mdp +31 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/min.mdp +14 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/npt.mdp +37 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/nvt.mdp +29 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/relax-min.mdp +13 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/relax-npt.mdp +37 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/relax-nvt.mdp +31 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/single-molecule-min.mdp +12 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/mdp/single-molecule-nvt.mdp +25 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/inputs/DFA.pdb +62 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/inputs/DGE.mol2 +115 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/inputs/EMB.mol2 +50 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/inputs/FDE.pdb +72 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/inputs/GMA.mol2 +163 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/inputs/PAC.mol2 +91 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/inputs/STY.mol2 +44 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/make-monomers.sh +64 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/pics/DFA.png +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/pics/DGE.png +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/pics/EMB.png +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/pics/FDE.png +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/pics/GMA.png +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/pics/PAC.png +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/pics/STY.png +0 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/sample-inputs/DFA.pdb +62 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/sample-inputs/DGE.mol2 +115 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/sample-inputs/EMB.mol2 +50 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/sample-inputs/FDE.pdb +72 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/sample-inputs/GMA.mol2 +163 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/sample-inputs/PAC.mol2 +91 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/molecules/sample-inputs/STY.mol2 +44 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/tcl/readbonds.tcl +32 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/tcl/readgrx.tcl +46 -0
- htpolynet-1.0.7.2/HTPolyNet/resources/tcl/render.tcl +74 -0
- htpolynet-1.0.7.2/HTPolyNet/ring.py +155 -0
- htpolynet-1.0.7.2/HTPolyNet/runtime.py +709 -0
- htpolynet-1.0.7.2/HTPolyNet/software.py +106 -0
- htpolynet-1.0.7.2/HTPolyNet/stringthings.py +39 -0
- htpolynet-1.0.7.2/HTPolyNet/topocoord.py +1877 -0
- htpolynet-1.0.7.2/HTPolyNet/topology.py +1288 -0
- htpolynet-1.0.7.2/HTPolyNet/unused_symmetry_stuff.py +291 -0
- htpolynet-1.0.7.2/HTPolyNet/utils.py +405 -0
- htpolynet-1.0.7.2/LICENSE +21 -0
- htpolynet-1.0.7.2/MANIFEST.in +1 -0
- htpolynet-1.0.7.2/PKG-INFO +84 -0
- htpolynet-1.0.7.2/README.md +58 -0
- htpolynet-1.0.7.2/docs/Makefile +20 -0
- htpolynet-1.0.7.2/docs/README.rst +6 -0
- htpolynet-1.0.7.2/docs/requirements.txt +1 -0
- htpolynet-1.0.7.2/docs/source/HTPolyNetPackage.rst +184 -0
- htpolynet-1.0.7.2/docs/source/conf.py +78 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/index.rst +13 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/index.rst +309 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/equil-rho_v_ns.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/postsim-typical.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/prod-e.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/prod-equil-rho_v_ns.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/prod-rho_v_ns.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/prod-tg.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/rho_v_ns.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/short-e.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/postsim_analyses/pics/short-tg.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/configuration.rst +71 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/files/EMB.mol2 +50 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/index.rst +19 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/introduction.rst +76 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/monomer.rst +142 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/4meb.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/EMB1_1_labelled.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/buildtraces.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/cure_info.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/densification-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/emb-labelled.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/global_traces.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/hi-pre.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/hi.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-1-cure_equilibrate-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-2-cap_equilibrate-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-2-cure_equilibrate-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/mst-vinyl.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.eps +316 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.fig +140 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-anneal-T.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-postequilibration-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-anneal-T.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-postequilibration-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-preequilibration-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/styrene-polymerization.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/reactions.rst +110 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/results.rst +272 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/run.rst +366 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/configuration.rst +51 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/files/DGE.mol2 +115 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/files/PAC.mol2 +91 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/index.rst +16 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/introduction.rst +58 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/monomers.rst +295 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/DGE-epoxy.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/DGE-labelled.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/PAC-2d.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/PAC-labelled.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/buildtraces.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/cure_info.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/densification-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dge-pac-cured.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dge-pac-liq.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.eps +748 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.fig +396 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r1.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r2.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r3.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/reactions.rst +104 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/results.rst +46 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/run.rst +265 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/configuration.rst +39 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/index.rst +15 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/introduction.rst +68 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/BPA.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/GMA.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/HIE.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/buildtraces.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/cure_info.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/densification-density.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.eps +417 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.fig +221 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/gma-sty-cured.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/gma-sty-liq.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/p1-traces.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.eps +972 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.fig +582 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.png +0 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/reactions.rst +275 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/results.rst +44 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/3-VE-STY/run.rst +385 -0
- htpolynet-1.0.7.2/docs/source/example-tutorials/shortbuilds/index.rst +18 -0
- htpolynet-1.0.7.2/docs/source/index.rst +36 -0
- htpolynet-1.0.7.2/docs/source/install.rst +116 -0
- htpolynet-1.0.7.2/docs/source/references/index.rst +16 -0
- htpolynet-1.0.7.2/docs/source/references/mol2-reference.pdf +0 -0
- htpolynet-1.0.7.2/docs/source/references.bib +68 -0
- htpolynet-1.0.7.2/docs/source/user-guide/CURE.odg +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/CURE.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/STY.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/STYCC.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/TypicalUsageFlow.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/bond_filter.odg +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/bond_filter.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/chemdoodle-2dsketcher-emb.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/chemdoodle-2dsketcher-styrene.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/configs/configs-for-analyze.rst +147 -0
- htpolynet-1.0.7.2/docs/source/user-guide/configs/configs-for-postsim.rst +298 -0
- htpolynet-1.0.7.2/docs/source/user-guide/configs/configs-for-run.rst +458 -0
- htpolynet-1.0.7.2/docs/source/user-guide/configuration-files.rst +14 -0
- htpolynet-1.0.7.2/docs/source/user-guide/flow1.odg +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/flow1.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/flow1yaml.odg +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/hydrogenated.eps +280 -0
- htpolynet-1.0.7.2/docs/source/user-guide/hydrogenated.fig +135 -0
- htpolynet-1.0.7.2/docs/source/user-guide/hydrogenated.png +0 -0
- htpolynet-1.0.7.2/docs/source/user-guide/index.rst +21 -0
- htpolynet-1.0.7.2/docs/source/user-guide/molecular-structure-inputs.rst +35 -0
- htpolynet-1.0.7.2/docs/source/user-guide/program-flow.rst +42 -0
- htpolynet-1.0.7.2/docs/source/user-guide/usage.rst +262 -0
- htpolynet-1.0.7.2/pyproject.toml +43 -0
- htpolynet-1.0.7.2/tests/__init__.py +0 -0
- htpolynet-1.0.7.2/tests/conftest.py +36 -0
- htpolynet-1.0.7.2/tests/unit/__init__.py +0 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/config1.gro +3603 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/config1.top +29474 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/config2.gro +39160 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/config2.top +401126 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/items31.edr +0 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/items43.edr +0 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/items45.edr +0 -0
- htpolynet-1.0.7.2/tests/unit/fixtures/short.mdp +28 -0
- htpolynet-1.0.7.2/tests/unit/test_gromacs_get_energy_menu.py +34 -0
- htpolynet-1.0.7.2/tests/unit/test_gromacs_gmx_energy_trace.py +70 -0
- htpolynet-1.0.7.2/tests/unit/test_resources.py +24 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Sphinx build
|
|
2
|
+
|
|
3
|
+
on: push
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v3
|
|
10
|
+
- uses: actions/setup-python@v3
|
|
11
|
+
- name: Install package
|
|
12
|
+
run: |
|
|
13
|
+
python3 -m pip install -e .
|
|
14
|
+
python3 -m pip install sphinx matplotlib pytrr sphinxcontrib-bibtex
|
|
15
|
+
cd docs
|
|
16
|
+
make html
|
|
17
|
+
cd ..
|
|
18
|
+
# - name: Build HTML
|
|
19
|
+
# uses: ammaraskar/sphinx-action@master
|
|
20
|
+
- name: Upload artifacts
|
|
21
|
+
uses: actions/upload-artifact@v3
|
|
22
|
+
with:
|
|
23
|
+
name: html-docs
|
|
24
|
+
path: docs/build/html/
|
|
25
|
+
- name: Deploy
|
|
26
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
27
|
+
if: github.ref == 'refs/heads/main'
|
|
28
|
+
with:
|
|
29
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
publish_dir: docs/build/html
|
|
31
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
*.bak
|
|
2
|
+
__defunct__/
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
.idea/
|
|
8
|
+
*tmp*
|
|
9
|
+
*/results
|
|
10
|
+
.vscode/
|
|
11
|
+
# C extensions
|
|
12
|
+
*.so
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
.Python
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
downloads/
|
|
20
|
+
eggs/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
sdist/
|
|
26
|
+
var/
|
|
27
|
+
wheels/
|
|
28
|
+
pip-wheel-metadata/
|
|
29
|
+
share/python-wheels/
|
|
30
|
+
*.egg-info/
|
|
31
|
+
.installed.cfg
|
|
32
|
+
*.egg
|
|
33
|
+
MANIFEST
|
|
34
|
+
|
|
35
|
+
# PyInstaller
|
|
36
|
+
# Usually these files are written by a python script from a template
|
|
37
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
38
|
+
*.manifest
|
|
39
|
+
*.spec
|
|
40
|
+
|
|
41
|
+
# Installer logs
|
|
42
|
+
pip-log.txt
|
|
43
|
+
pip-delete-this-directory.txt
|
|
44
|
+
|
|
45
|
+
# Unit test / coverage reports
|
|
46
|
+
htmlcov/
|
|
47
|
+
.tox/
|
|
48
|
+
.nox/
|
|
49
|
+
.coverage
|
|
50
|
+
.coverage.*
|
|
51
|
+
.cache
|
|
52
|
+
nosetests.xml
|
|
53
|
+
coverage.xml
|
|
54
|
+
*.cover
|
|
55
|
+
*.py,cover
|
|
56
|
+
.hypothesis/
|
|
57
|
+
.pytest_cache/
|
|
58
|
+
|
|
59
|
+
# Translations
|
|
60
|
+
*.mo
|
|
61
|
+
*.pot
|
|
62
|
+
|
|
63
|
+
# Django stuff:
|
|
64
|
+
*.log
|
|
65
|
+
local_settings.py
|
|
66
|
+
db.sqlite3
|
|
67
|
+
db.sqlite3-journal
|
|
68
|
+
|
|
69
|
+
# Flask stuff:
|
|
70
|
+
instance/
|
|
71
|
+
.webassets-cache
|
|
72
|
+
|
|
73
|
+
# Scrapy stuff:
|
|
74
|
+
.scrapy
|
|
75
|
+
|
|
76
|
+
# Sphinx documentation
|
|
77
|
+
docs/_build/
|
|
78
|
+
docs/source/_build/
|
|
79
|
+
|
|
80
|
+
# PyBuilder
|
|
81
|
+
target/
|
|
82
|
+
|
|
83
|
+
# Jupyter Notebook
|
|
84
|
+
.ipynb_checkpoints
|
|
85
|
+
|
|
86
|
+
# IPython
|
|
87
|
+
profile_default/
|
|
88
|
+
ipython_config.py
|
|
89
|
+
|
|
90
|
+
# pyenv
|
|
91
|
+
.python-version
|
|
92
|
+
|
|
93
|
+
# pipenv
|
|
94
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
95
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
96
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
97
|
+
# install all needed dependencies.
|
|
98
|
+
#Pipfile.lock
|
|
99
|
+
|
|
100
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
101
|
+
__pypackages__/
|
|
102
|
+
|
|
103
|
+
# Celery stuff
|
|
104
|
+
celerybeat-schedule
|
|
105
|
+
celerybeat.pid
|
|
106
|
+
|
|
107
|
+
# SageMath parsed files
|
|
108
|
+
*.sage.py
|
|
109
|
+
|
|
110
|
+
# Environments
|
|
111
|
+
.env
|
|
112
|
+
.venv
|
|
113
|
+
env/
|
|
114
|
+
venv/
|
|
115
|
+
ENV/
|
|
116
|
+
env.bak/
|
|
117
|
+
venv.bak/
|
|
118
|
+
|
|
119
|
+
# Spyder project settings
|
|
120
|
+
.spyderproject
|
|
121
|
+
.spyproject
|
|
122
|
+
|
|
123
|
+
# Rope project settings
|
|
124
|
+
.ropeproject
|
|
125
|
+
|
|
126
|
+
# mkdocs documentation
|
|
127
|
+
/site
|
|
128
|
+
|
|
129
|
+
# mypy
|
|
130
|
+
.mypy_cache/
|
|
131
|
+
.dmypy.json
|
|
132
|
+
dmypy.json
|
|
133
|
+
|
|
134
|
+
# Pyre type checker
|
|
135
|
+
.pyre/
|
|
136
|
+
.vscode/settings.json
|
|
137
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
HTPOLYNET_VERSION='1.0.7.1'
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
.. module:: ambertools
|
|
4
|
+
:synopsis: Manages execution of AmberTools antechamber, parmchk2.
|
|
5
|
+
|
|
6
|
+
.. moduleauthor: Cameron F. Abrams, <cfa22@drexel.edu>
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
import logging
|
|
10
|
+
import hashlib
|
|
11
|
+
import shutil
|
|
12
|
+
import parmed
|
|
13
|
+
from HTPolyNet.command import Command
|
|
14
|
+
from HTPolyNet.coordinates import Coordinates
|
|
15
|
+
logger=logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
def GAFFParameterize(inputPrefix,outputPrefix,input_structure_format='mol2',**kwargs):
|
|
18
|
+
"""GAFFParameterize manages execution of antechamber, tleap, and parmchk2 to generate
|
|
19
|
+
GAFF parameters
|
|
20
|
+
|
|
21
|
+
:param inputPrefix: basename of input structure file
|
|
22
|
+
:type inputPrefix: str
|
|
23
|
+
:param outputPrefix: basename of output files
|
|
24
|
+
:type outputPrefix: str
|
|
25
|
+
:param input_structure_format: format of input structure file, defaults to 'mol2'; 'pdb' is other option
|
|
26
|
+
:type input_structure_format: str, optional
|
|
27
|
+
:raises parmed.exceptions.GromacsError: if parmed fails
|
|
28
|
+
"""
|
|
29
|
+
ambertools_dict=kwargs.get('ambertools',{})
|
|
30
|
+
if ambertools_dict:
|
|
31
|
+
chargemethod=ambertools_dict.get('charge_method','bcc')
|
|
32
|
+
else:
|
|
33
|
+
chargemethod=kwargs.get('charge_method','bcc')
|
|
34
|
+
logger.info(f'AmberTools> generating GAFF parameters from {inputPrefix}.{input_structure_format}')
|
|
35
|
+
structin=f'{inputPrefix}.{input_structure_format}'
|
|
36
|
+
mol2out=f'{outputPrefix}.mol2'
|
|
37
|
+
frcmodout=f'{outputPrefix}.frcmod'
|
|
38
|
+
new_structin=structin
|
|
39
|
+
if structin==mol2out:
|
|
40
|
+
new_structin=inputPrefix+f'-input.{input_structure_format}'
|
|
41
|
+
logger.debug(f'AmberTools> Antechamber overwrites input {structin}; backing up to {new_structin}')
|
|
42
|
+
shutil.copy(structin,new_structin)
|
|
43
|
+
groOut=f'{outputPrefix}.gro'
|
|
44
|
+
topOut=f'{outputPrefix}.top'
|
|
45
|
+
itpOut=f'{outputPrefix}.itp'
|
|
46
|
+
c=Command('antechamber',j=4,fi=input_structure_format,fo='mol2',c=chargemethod,at='gaff',i=new_structin,o=mol2out,pf='Y',nc=0,eq=1,pl=10)
|
|
47
|
+
c.run(quiet=False)
|
|
48
|
+
logger.debug(f'AmberTools> Antechamber generated {mol2out}')
|
|
49
|
+
c=Command('parmchk2',i=mol2out,o=frcmodout,f='mol2',s='gaff')
|
|
50
|
+
c.run(quiet=False)
|
|
51
|
+
# Antechamber ignores SUBSTRUCTURES but we would like tleap to
|
|
52
|
+
# recognize them. So we will simply use the antechamber-INPUT mol2 file
|
|
53
|
+
# resName and resNum atom record fields over the antechamber-OUTPUT mol2 file
|
|
54
|
+
# to generate the tleap-INPUT mol2 file. Also, since tleap can't handle
|
|
55
|
+
# wacky filenames, we'll hash the outputPrefix temporarily.
|
|
56
|
+
if input_structure_format=='mol2':
|
|
57
|
+
goodMol2=Coordinates.read_mol2(new_structin)
|
|
58
|
+
acOutMol2=Coordinates.read_mol2(mol2out)
|
|
59
|
+
adf=acOutMol2.A
|
|
60
|
+
adf['resName']=goodMol2.A['resName'].copy()
|
|
61
|
+
adf['resNum']=goodMol2.A['resNum'].copy()
|
|
62
|
+
goodMol2.A=adf
|
|
63
|
+
else:
|
|
64
|
+
goodMol2=Coordinates.read_mol2(mol2out)
|
|
65
|
+
leapprefix=hashlib.shake_128(outputPrefix.encode("utf-8")).hexdigest(16).replace('e','x')
|
|
66
|
+
goodMol2.write_mol2(f'{leapprefix}.mol2')
|
|
67
|
+
logger.debug(f'Replacing string "{outputPrefix}" with hash "{leapprefix}" for leap input files.')
|
|
68
|
+
Command(f'cp {frcmodout} {leapprefix}.frcmod').run()
|
|
69
|
+
with open(f'{inputPrefix}-tleap.in', 'w') as f:
|
|
70
|
+
f.write(f'source leaprc.gaff\n')
|
|
71
|
+
f.write(f'mymol = loadmol2 {leapprefix}.mol2\n')
|
|
72
|
+
f.write(f'check mymol\n')
|
|
73
|
+
f.write(f'loadamberparams {leapprefix}.frcmod\n')
|
|
74
|
+
f.write(f'saveamberparm mymol {leapprefix}-tleap.top {leapprefix}-tleap.crd\n')
|
|
75
|
+
f.write('quit\n')
|
|
76
|
+
c=Command('tleap',f=f'{inputPrefix}-tleap.in')
|
|
77
|
+
c.run(override=('Error!','Unspecified tleap error'))
|
|
78
|
+
Command(f'rm -f {leapprefix}.frcmod').run()
|
|
79
|
+
Command(f'mv {leapprefix}.mol2 {outputPrefix}.mol2').run()
|
|
80
|
+
Command(f'mv {leapprefix}-tleap.top {outputPrefix}-tleap.top').run()
|
|
81
|
+
Command(f'mv {leapprefix}-tleap.crd {outputPrefix}-tleap.crd').run()
|
|
82
|
+
# save the results of the antechamber/parmchk2/tleap sequence as Gromacs gro and top files
|
|
83
|
+
try:
|
|
84
|
+
file=parmed.load_file(f'{outputPrefix}-tleap.top', xyz=f'{outputPrefix}-tleap.crd')
|
|
85
|
+
logger.debug(f'Writing {groOut}, {topOut}, and {itpOut}')
|
|
86
|
+
file.save(groOut,overwrite=True)
|
|
87
|
+
file.save(topOut,parameters=itpOut,overwrite=True)
|
|
88
|
+
except Exception as m:
|
|
89
|
+
logger.error('Unspecified parmed error')
|
|
90
|
+
raise parmed.exceptions.GromacsError(m)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
.. module:: analyze
|
|
4
|
+
:synopsis: handles the analyze subcommand
|
|
5
|
+
|
|
6
|
+
.. moduleauthor: Cameron F. Abrams, <cfa22@drexel.edu>
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
import logging
|
|
10
|
+
import os
|
|
11
|
+
import json
|
|
12
|
+
import yaml
|
|
13
|
+
import HTPolyNet.projectfilesystem as pfs
|
|
14
|
+
from HTPolyNet.gromacs import gmx_command
|
|
15
|
+
import HTPolyNet.software as software
|
|
16
|
+
from HTPolyNet.configuration import Configuration
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
|
|
19
|
+
logger=logging.getLogger(__name__)
|
|
20
|
+
|
|
21
|
+
class Analyze:
|
|
22
|
+
allowed_keys=['gromacs','command','subdir','options','links','outfile','console-input','matchlines']
|
|
23
|
+
required_keys=['command','subdir']
|
|
24
|
+
default_params={
|
|
25
|
+
'gromacs' : {
|
|
26
|
+
'gmx': 'gmx'
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
def __init__(self,indict,strict=True):
|
|
30
|
+
self.params={}
|
|
31
|
+
for p,v in self.default_params.items():
|
|
32
|
+
self.params[p]=indict.get(p,v)
|
|
33
|
+
for p,v in indict.items():
|
|
34
|
+
if not p in self.allowed_keys:
|
|
35
|
+
if strict:
|
|
36
|
+
logger.info(f'Ignoring directive \'{p}\' in yaml input file')
|
|
37
|
+
if p in self.default_params:
|
|
38
|
+
logger.info(f'Overwriting default {p} value')
|
|
39
|
+
self.params[p]=v
|
|
40
|
+
self.console_output=None
|
|
41
|
+
|
|
42
|
+
def do(self,**gromacs_dict):
|
|
43
|
+
"""do handles executing the analysis
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
p=self.params
|
|
47
|
+
print(p)
|
|
48
|
+
for rk in self.required_keys:
|
|
49
|
+
assert rk in p, f'Error: no {rk} value found'
|
|
50
|
+
# logger.info(f'do {p}')
|
|
51
|
+
# if a gromacs dict is passed in, assume this overrides the one read in from the file
|
|
52
|
+
if gromacs_dict:
|
|
53
|
+
software.set_gmx_preferences(gromacs_dict)
|
|
54
|
+
else:
|
|
55
|
+
software.set_gmx_preferences(p['gromacs'])
|
|
56
|
+
logger.info(f'going to {p["subdir"]}')
|
|
57
|
+
pfs.go_to(p['subdir'])
|
|
58
|
+
# make symlinks to requested files
|
|
59
|
+
symlinks=p.get('links',[])
|
|
60
|
+
for input_file in symlinks:
|
|
61
|
+
srcnm=os.path.join(pfs.proj(),input_file)
|
|
62
|
+
bsnm=os.path.basename(srcnm)
|
|
63
|
+
chk=Path(bsnm)
|
|
64
|
+
if not chk.is_symlink():
|
|
65
|
+
os.symlink(srcnm,bsnm)
|
|
66
|
+
else:
|
|
67
|
+
logger.info(f'Symlink {bsnm} already exists.')
|
|
68
|
+
cfile=''
|
|
69
|
+
if 'console-input' in p:
|
|
70
|
+
cfile='console-in.txt'
|
|
71
|
+
ci=p['console-input']
|
|
72
|
+
with open(cfile,'w') as f:
|
|
73
|
+
for ch in ci:
|
|
74
|
+
f.write(ch+'\n')
|
|
75
|
+
self.console_output=gmx_command(p['command'],p.get('options',{}),console_in=cfile)
|
|
76
|
+
logger.info(f'Command {p["command"]} completed.')
|
|
77
|
+
|
|
78
|
+
def parse_console_output(self):
|
|
79
|
+
if not self.console_output:
|
|
80
|
+
logger.info(f'No console output')
|
|
81
|
+
return
|
|
82
|
+
p=self.params
|
|
83
|
+
# either we are grepping out lines from console output or putting it all out there
|
|
84
|
+
if not 'outfile' in p:
|
|
85
|
+
logger.info(f'Here is the console output')
|
|
86
|
+
logger.info(self.console_output)
|
|
87
|
+
else:
|
|
88
|
+
if not 'matchlines' in p:
|
|
89
|
+
with open(p['outfile'],'w') as f:
|
|
90
|
+
f.write(self.console_output)
|
|
91
|
+
else:
|
|
92
|
+
svlns=[]
|
|
93
|
+
console_lines=self.console_output.split('\n')
|
|
94
|
+
for cl in console_lines:
|
|
95
|
+
for ml in p['matchlines']:
|
|
96
|
+
if ml in cl:
|
|
97
|
+
svlns.append(cl)
|
|
98
|
+
with open(p['outfile'],'w') as f:
|
|
99
|
+
for s in svlns:
|
|
100
|
+
f.write(s+'\n')
|
|
101
|
+
logger.info(f'Created {p["outfile"]} in {p["subdir"]}')
|
|
102
|
+
|
|
103
|
+
class AnalyzeDensity(Analyze):
|
|
104
|
+
""" Analyze class for handling trajectory density profile calculation
|
|
105
|
+
"""
|
|
106
|
+
default_params={
|
|
107
|
+
'subdir': 'analyze/density',
|
|
108
|
+
'links': ['postsim/equilibrate/equilibrate.tpr','postsim/equilibrate/equilibrate.trr'],
|
|
109
|
+
'gromacs' : {
|
|
110
|
+
'gmx': 'gmx'
|
|
111
|
+
},
|
|
112
|
+
'command': 'density',
|
|
113
|
+
'options': {
|
|
114
|
+
's':'equilibrate.tpr',
|
|
115
|
+
'f':'equilibrate.trr',
|
|
116
|
+
'o':'density.xvg',
|
|
117
|
+
'xvg': 'none',
|
|
118
|
+
'b': 0,
|
|
119
|
+
'd': 'Z',
|
|
120
|
+
'sl': 50
|
|
121
|
+
},
|
|
122
|
+
'console-input': ['0']
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
class AnalyzeFFV(Analyze):
|
|
126
|
+
default_params={
|
|
127
|
+
'subdir': 'analyze/freevolume',
|
|
128
|
+
'links': ['postsim/equilibrate/equilibrate.tpr','postsim/equilibrate/equilibrate.trr'],
|
|
129
|
+
'gromacs' : {
|
|
130
|
+
'gmx': 'gmx'
|
|
131
|
+
},
|
|
132
|
+
'command': 'freevolume',
|
|
133
|
+
'options': {
|
|
134
|
+
's':'equilibrate.tpr',
|
|
135
|
+
'f':'equilibrate.trr',
|
|
136
|
+
'o':'ffv.xvg',
|
|
137
|
+
'xvg': 'none',
|
|
138
|
+
'b': 0.0
|
|
139
|
+
},
|
|
140
|
+
'outfile': 'ffv.dat',
|
|
141
|
+
'matchlines': ['Free volume','Total volume','Number of molecules','Average molar mass','Density','Molecular volume Vm assuming homogeneity:','Molecular van der Waals volume assuming homogeneity:','Fractional free volume']
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class AnalyzeConfiguration:
|
|
146
|
+
""" handles reading and parsing an analysis input config file.
|
|
147
|
+
Config file format
|
|
148
|
+
|
|
149
|
+
- { key1: {<paramdict>}}
|
|
150
|
+
- { key2: {<paramdict>}}
|
|
151
|
+
|
|
152
|
+
...
|
|
153
|
+
|
|
154
|
+
The config file is a list of single-element dictionaries, whose single keyword
|
|
155
|
+
indicates the type of analysis to be run; analyses are run in the order
|
|
156
|
+
they appear in the config file.
|
|
157
|
+
|
|
158
|
+
"""
|
|
159
|
+
default_class=Analyze
|
|
160
|
+
predefined_classes={'density':AnalyzeDensity,'freevolume':AnalyzeFFV}
|
|
161
|
+
def __init__(self):
|
|
162
|
+
self.cfgFile=''
|
|
163
|
+
self.baselist=[]
|
|
164
|
+
self.stagelist=[]
|
|
165
|
+
|
|
166
|
+
@classmethod
|
|
167
|
+
def read(cls,filename,parse=True,**kwargs):
|
|
168
|
+
"""read generates a new PostsimConfiguration object by reading in the JSON or YAML file indicated by filename
|
|
169
|
+
|
|
170
|
+
:param filename: name of file from which to read new PostsimConfiguration object
|
|
171
|
+
:type filename: str
|
|
172
|
+
:param parse: if True, parse the input configuration file, defaults to True
|
|
173
|
+
:type parse: bool, optional
|
|
174
|
+
:raises Exception: if extension of filename is not '.json' or '.yaml' or '.yml'
|
|
175
|
+
:return: a new PostsimConfiguration object
|
|
176
|
+
:rtype: PostsimConfiguration
|
|
177
|
+
"""
|
|
178
|
+
basename,extension=os.path.splitext(filename)
|
|
179
|
+
if extension=='.json':
|
|
180
|
+
return cls._read_json(filename,parse,**kwargs)
|
|
181
|
+
elif extension=='.yaml' or extension=='.yml':
|
|
182
|
+
return cls._read_yaml(filename,parse,**kwargs)
|
|
183
|
+
else:
|
|
184
|
+
raise Exception(f'Unknown config file extension {extension}')
|
|
185
|
+
|
|
186
|
+
@classmethod
|
|
187
|
+
def _read_json(cls,filename,parse=True,**kwargs):
|
|
188
|
+
"""_read_json create a new PostsimConfiguration object by reading from JSON input
|
|
189
|
+
|
|
190
|
+
:param filename: name of JSON file
|
|
191
|
+
:type filename: str
|
|
192
|
+
:param parse: if True, parse the JSON data, defaults to True
|
|
193
|
+
:type parse: bool, optional
|
|
194
|
+
:return: a new PostsimConfiguration object
|
|
195
|
+
:rtype: PostsimConfiguration
|
|
196
|
+
"""
|
|
197
|
+
inst=cls()
|
|
198
|
+
inst.cfgFile=filename
|
|
199
|
+
with open(filename,'r') as f:
|
|
200
|
+
inst.baselist=json.load(f)
|
|
201
|
+
assert type(inst.baselist)==list,f'Poorly formatted {filename}'
|
|
202
|
+
if parse: inst.parse(**kwargs)
|
|
203
|
+
return inst
|
|
204
|
+
|
|
205
|
+
@classmethod
|
|
206
|
+
def _read_yaml(cls,filename,parse=True,**kwargs):
|
|
207
|
+
"""_read_yaml create a new PostsimConfiguration object by reading from YAML input
|
|
208
|
+
|
|
209
|
+
:param filename: name of YAML file
|
|
210
|
+
:type filename: str
|
|
211
|
+
:param parse: if True, parse the YAML data, defaults to True
|
|
212
|
+
:type parse: bool, optional
|
|
213
|
+
:return: a new PostsimConfiguration object
|
|
214
|
+
:rtype: PostsimConfiguration
|
|
215
|
+
"""
|
|
216
|
+
inst=cls()
|
|
217
|
+
inst.cfgFile=filename
|
|
218
|
+
with open(filename,'r') as f:
|
|
219
|
+
inst.baselist=yaml.safe_load(f)
|
|
220
|
+
assert type(inst.baselist)==list,f'Poorly formatted {filename}'
|
|
221
|
+
if parse: inst.parse(**kwargs)
|
|
222
|
+
return inst
|
|
223
|
+
|
|
224
|
+
def parse(self,**kwargs):
|
|
225
|
+
"""parse parses a PostsimConfiguration file to build the list of stages to run
|
|
226
|
+
"""
|
|
227
|
+
for content in self.baselist:
|
|
228
|
+
analysistype=content['command']
|
|
229
|
+
if analysistype in self.predefined_classes:
|
|
230
|
+
self.stagelist.append(self.predefined_classes[analysistype](content))
|
|
231
|
+
else:
|
|
232
|
+
self.stagelist.append(self.default_class(content))
|
|
233
|
+
|
|
234
|
+
def analyze(args):
|
|
235
|
+
"""postsim handles the analyze subcommand for managing gromacs-based trajectory analyses
|
|
236
|
+
|
|
237
|
+
:param args: command-line arguments
|
|
238
|
+
:type args: argparse.Namespace
|
|
239
|
+
"""
|
|
240
|
+
loglevel_numeric=getattr(logging, args.loglevel.upper())
|
|
241
|
+
logging.basicConfig(format='%(levelname)s> %(message)s',level=loglevel_numeric)
|
|
242
|
+
ess='y' if len(args.proj)==0 else 'ies'
|
|
243
|
+
ogromacs={}
|
|
244
|
+
if args.ocfg:
|
|
245
|
+
ocfg=Configuration.read(args.ocfg,parse=False)
|
|
246
|
+
ogromacs=ocfg.basedict.get('gromacs',{})
|
|
247
|
+
cfg=AnalyzeConfiguration.read(args.cfg)
|
|
248
|
+
logger.debug(f'{cfg.baselist}')
|
|
249
|
+
logger.info(f'Project director{ess}: {args.proj}')
|
|
250
|
+
software.sw_setup()
|
|
251
|
+
logger.debug(f'ogromacs {ogromacs}')
|
|
252
|
+
for d in args.proj:
|
|
253
|
+
pfs.pfs_setup(root=os.getcwd(),topdirs=['molecules','systems','plots','postsim','analyze'],verbose=True,projdir=d,reProject=False,userlibrary=args.lib)
|
|
254
|
+
pfs.go_to('analyze')
|
|
255
|
+
for stage in cfg.stagelist:
|
|
256
|
+
stage.do(**ogromacs)
|
|
257
|
+
stage.parse_console_output()
|
|
258
|
+
pfs.go_root()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
.. module:: banner
|
|
4
|
+
:synopsis: Defines the banner method for printing the banner to a logging channel
|
|
5
|
+
|
|
6
|
+
.. moduleauthor: Cameron F. Abrams, <cfa22@drexel.edu>
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
from HTPolyNet.stringthings import my_logger
|
|
10
|
+
from HTPolyNet.__init__ import HTPOLYNET_VERSION
|
|
11
|
+
|
|
12
|
+
banner_message="""
|
|
13
|
+
HTPolyNet {:s}
|
|
14
|
+
https://abramsgroup.github.io/HTPolyNet/
|
|
15
|
+
|
|
16
|
+
Ming Huang
|
|
17
|
+
mh3429@dragons.drexel.edu
|
|
18
|
+
|
|
19
|
+
Cameron F. Abrams
|
|
20
|
+
cfa22@drexel.edu
|
|
21
|
+
|
|
22
|
+
Supported in part by Grants W911NF-17-2-0227
|
|
23
|
+
and W911NF-12-R-0011 from the US Army Research Lab
|
|
24
|
+
""".format(HTPOLYNET_VERSION)
|
|
25
|
+
def banner(logf):
|
|
26
|
+
my_logger(banner_message,logf,fill=' ',just='<')
|