HTPolyNet 1.0.8__tar.gz → 1.0.9__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.9/HTPolyNet/chain.py +135 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/coordinates.py +3 -3
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/curecontroller.py +3 -1
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/expandreactions.py +30 -30
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/molecule.py +11 -15
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/runtime.py +5 -6
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/software.py +0 -1
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/topocoord.py +262 -168
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/topology.py +3 -1
- {htpolynet-1.0.8 → htpolynet-1.0.9}/PKG-INFO +12 -5
- {htpolynet-1.0.8 → htpolynet-1.0.9}/README.md +11 -4
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/conf.py +2 -2
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/configuration.rst +2 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/introduction.rst +1 -1
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/densification-density copy.png +0 -0
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-anneal-T.png +0 -0
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-postequilibration-density.png +0 -0
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-anneal-T.png +0 -0
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-postequilibration-density.png +0 -0
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-preequilibration-density.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/results.rst +41 -39
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/run.rst +26 -6
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/introduction.rst +26 -15
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/monomers.rst +2 -2
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/buildtraces.png +0 -0
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/cure_info.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/results.rst +1 -1
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/run.rst +105 -103
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/buildtraces.png +0 -0
- htpolynet-1.0.9/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/cure_info.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/results.rst +2 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/run.rst +112 -123
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/configs/configs-for-run.rst +12 -9
- {htpolynet-1.0.8 → htpolynet-1.0.9}/pyproject.toml +1 -1
- htpolynet-1.0.9/tests/unit/test_chain.py +170 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-anneal-T.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-postequilibration-density.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-anneal-T.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-postequilibration-density.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-preequilibration-density.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/buildtraces.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/cure_info.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/buildtraces.png +0 -0
- htpolynet-1.0.8/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/cure_info.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/.github/workflows/sphinx.yml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/.gitignore +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/__init__.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/ambertools.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/analyze.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/banner.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/bondlist.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/bondtemplate.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/checkpoint.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/command.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/configuration.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/countTime.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/dataframetools.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/driver.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/gromacs.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/inputcheck.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/linkcell.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/matrix4.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/plot.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/postsim.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/projectfilesystem.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/reaction.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/README.md +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/__init__.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/DGE-PAC-hi.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/DGE-PAC-lo.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/FDE-DFDA-hi.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/FDE-DFDA-lo.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/GMASTY-hi.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/GMASTY-lo.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/README.md +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/STY.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pMSTY-hi.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pMSTY-lo.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pSTY-hi.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pSTY-lo.yaml +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/example_depot/0-liquid-styrene.tgz +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/example_depot/1-polystyrene.tgz +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/example_depot/2-polymethylstyrene.tgz +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/example_depot/3-bisgma-styrene-thermoset.tgz +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/example_depot/4-pacm-dgeba-epoxy-thermoset.tgz +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/example_depot/5-dfda-fde-epoxy-thermoset.tgz +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/README.md +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/drag-min.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/drag-npt.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/drag-nvt.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/min.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/npt.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/nvt.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/relax-min.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/relax-npt.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/relax-nvt.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/single-molecule-min.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/single-molecule-nvt.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/DFA.pdb +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/DGE.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/EMB.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/FDE.pdb +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/GMA.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/PAC.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/STY.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/make-monomers.sh +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/DFA.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/DGE.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/EMB.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/FDE.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/GMA.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/PAC.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/STY.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/DFA.pdb +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/DGE.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/EMB.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/FDE.pdb +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/GMA.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/PAC.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/STY.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/tcl/readbonds.tcl +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/tcl/readgrx.tcl +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/resources/tcl/render.tcl +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/ring.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/stringthings.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/unused_symmetry_stuff.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/HTPolyNet/utils.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/LICENSE +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/MANIFEST.in +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/Makefile +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/README.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/requirements.txt +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/HTPolyNetPackage.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/equil-rho_v_ns.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/postsim-typical.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-e.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-equil-rho_v_ns.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-rho_v_ns.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-tg.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/rho_v_ns.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/short-e.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/short-tg.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/files/EMB.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/monomer.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/4meb.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/EMB1_1_labelled.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/buildtraces.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/cure_info.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/densification-density.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/emb-labelled.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/global_traces.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/hi-pre.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/hi.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-1-cure_equilibrate-density.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-2-cap_equilibrate-density.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-2-cure_equilibrate-density.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/mst-vinyl.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.eps +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.fig +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/styrene-polymerization.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/reactions.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/configuration.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/files/DGE.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/files/PAC.mol2 +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/DGE-epoxy.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/DGE-labelled.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/PAC-2d.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/PAC-labelled.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/densification-density.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dge-pac-cured.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dge-pac-liq.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.eps +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.fig +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r1.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r2.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r3.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/reactions.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/configuration.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/introduction.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/BPA.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/GMA.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/HIE.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/densification-density.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.eps +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.fig +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/gma-sty-cured.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/gma-sty-liq.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/p1-traces.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.eps +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.fig +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/reactions.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/install.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/references/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/references/mol2-reference.pdf +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/references.bib +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/CURE.odg +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/CURE.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/STY.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/STYCC.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/TypicalUsageFlow.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/bond_filter.odg +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/bond_filter.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/chemdoodle-2dsketcher-emb.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/chemdoodle-2dsketcher-styrene.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/configs/configs-for-analyze.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/configs/configs-for-postsim.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/configuration-files.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/flow1.odg +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/flow1.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/flow1yaml.odg +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/hydrogenated.eps +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/hydrogenated.fig +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/hydrogenated.png +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/index.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/molecular-structure-inputs.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/program-flow.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/docs/source/user-guide/usage.rst +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/__init__.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/conftest.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/__init__.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/config1.gro +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/config1.top +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/config2.gro +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/config2.top +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/items31.edr +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/items43.edr +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/items45.edr +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/fixtures/short.mdp +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/test_dataframetools.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/test_gromacs_get_energy_menu.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/test_gromacs_gmx_energy_trace.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/test_resources.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/test_ring.py +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/test_topology/test.top +0 -0
- {htpolynet-1.0.8 → htpolynet-1.0.9}/tests/unit/test_topology.py +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""
|
|
2
|
+
|
|
3
|
+
.. module:: chain
|
|
4
|
+
:synopsis: Manages data structure that keeps track of polymerized chains
|
|
5
|
+
|
|
6
|
+
.. moduleauthor: Cameron F. Abrams, <cfa22@drexel.edu>
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
import logging
|
|
10
|
+
logger=logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
class Chain:
|
|
13
|
+
def __init__(self,head=-1,tail=-1,idx=-1):
|
|
14
|
+
self.idx_list=[]
|
|
15
|
+
if head!=-1:
|
|
16
|
+
self.idx_list.append(head)
|
|
17
|
+
if tail!=-1:
|
|
18
|
+
self.idx_list.append(tail)
|
|
19
|
+
self.is_cyclic=False
|
|
20
|
+
self.idx=idx
|
|
21
|
+
def is_head(self,a):
|
|
22
|
+
return not self.is_cyclic and a==self.idx_list[0]
|
|
23
|
+
def is_tail(self,a):
|
|
24
|
+
return not self.is_cyclic and a==self.idx_list[-1]
|
|
25
|
+
def merge(self,other):
|
|
26
|
+
# tail of self bonds to head of other
|
|
27
|
+
self.idx_list.extend(other.idx_list)
|
|
28
|
+
|
|
29
|
+
def remap_idx(self,idx_mapper):
|
|
30
|
+
self.idx_list=[idx_mapper[x] for x in self.idx_list]
|
|
31
|
+
def shift(self,shift):
|
|
32
|
+
self.idx_list=[x+shift for x in self.idx_list]
|
|
33
|
+
|
|
34
|
+
class ChainManager:
|
|
35
|
+
def __init__(self,**kwargs):
|
|
36
|
+
self.chains=[]
|
|
37
|
+
self.create_if_missing=kwargs.get('create_if_missing',False)
|
|
38
|
+
|
|
39
|
+
def chain_of(self,a):
|
|
40
|
+
for c in self.chains:
|
|
41
|
+
if a in c.idx_list:
|
|
42
|
+
return c
|
|
43
|
+
return None
|
|
44
|
+
|
|
45
|
+
def new_chain(self,head,tail):
|
|
46
|
+
self.chains.append(Chain(head=head,tail=tail,idx=len(self.chains)))
|
|
47
|
+
|
|
48
|
+
def mergechains(self,dst,src):
|
|
49
|
+
dst.merge(src)
|
|
50
|
+
self.chains.remove(src)
|
|
51
|
+
self.reindex()
|
|
52
|
+
|
|
53
|
+
def injest_other(self,other):
|
|
54
|
+
self.chains.extend(other.chains)
|
|
55
|
+
self.reindex()
|
|
56
|
+
|
|
57
|
+
def reindex(self):
|
|
58
|
+
for i,c in enumerate(self.chains):
|
|
59
|
+
c.idx=i
|
|
60
|
+
|
|
61
|
+
def shift(self,shift):
|
|
62
|
+
for c in self.chains:
|
|
63
|
+
c.shift(shift)
|
|
64
|
+
|
|
65
|
+
def remap(self,idx_mapper):
|
|
66
|
+
for c in self.chains:
|
|
67
|
+
c.remap_idx(idx_mapper)
|
|
68
|
+
|
|
69
|
+
def injest_bond(self,ai,aj):
|
|
70
|
+
ic=self.chain_of(ai)
|
|
71
|
+
jc=self.chain_of(aj)
|
|
72
|
+
if not ic and not jc:
|
|
73
|
+
if self.create_if_missing:
|
|
74
|
+
logger.debug(f'New chain with head {ai} and tail {aj}')
|
|
75
|
+
self.new_chain(ai,aj)
|
|
76
|
+
else:
|
|
77
|
+
pass
|
|
78
|
+
elif not ic:
|
|
79
|
+
logger.debug(f'j-Atom {aj} (chain {jc.idx}) bonds to atom {ai}, but {ai} is not yet in a chain.')
|
|
80
|
+
logger.debug(f'This should never happen in a C=C polymerizing system; all reactive Cs are in chains from the very beginning!')
|
|
81
|
+
raise Exception('This is a bug - no i-chain!')
|
|
82
|
+
elif not jc:
|
|
83
|
+
logger.debug(f'i-Atom {ai} (chain {ic.idx}) bonds to atom {aj}, but {aj} is not yet in a chain.')
|
|
84
|
+
logger.debug(f'This should never happen in a C=C polymerizing system; all reactive Cs are in chains from the very beginning!')
|
|
85
|
+
raise Exception('This is a bug - no j-chain!')
|
|
86
|
+
elif ic==jc:
|
|
87
|
+
assert (ic.is_head(ai) and ic.is_tail(aj)) or (ic.is_head(aj) and ic.is_tail(ai))
|
|
88
|
+
ic.is_cyclic=True
|
|
89
|
+
logger.debug(f'New bond between {ai} and {aj} creates a cyclic chain of length ({len(ic.idx_list)})')
|
|
90
|
+
elif ic.is_head(ai) and jc.is_tail(aj):
|
|
91
|
+
assert not ic.is_cyclic and not jc.is_cyclic
|
|
92
|
+
self.mergechains(jc,ic)
|
|
93
|
+
elif jc.is_head(aj) and ic.is_tail(ai):
|
|
94
|
+
assert not ic.is_cyclic and not jc.is_cyclic
|
|
95
|
+
self.mergechains(ic,jc)
|
|
96
|
+
|
|
97
|
+
def injest_bonds(self,bondlist):
|
|
98
|
+
for b in bondlist:
|
|
99
|
+
self.injest_bond(b[0],b[1])
|
|
100
|
+
|
|
101
|
+
def to_dataframe(self,D,lidx_col='bondchain_idx',gidx_col='bondchain'):
|
|
102
|
+
assert lidx_col in D and gidx_col in D,f'Dataframe missing column {lidx_col} or {gidx_col}'
|
|
103
|
+
# wipe out df
|
|
104
|
+
D[lidx_col]=[-1]*D.shape[0]
|
|
105
|
+
D[gidx_col]=[-1]*D.shape[0]
|
|
106
|
+
for gidx,c in enumerate(self.chains):
|
|
107
|
+
for lidx,atidx in enumerate(c.idx_list):
|
|
108
|
+
df_idx=atidx-1 # should be true always
|
|
109
|
+
D.loc[df_idx,lidx_col]=lidx
|
|
110
|
+
D.loc[df_idx,gidx_col]=gidx
|
|
111
|
+
|
|
112
|
+
def from_dataframe(self,D,lidx_col='bondchain_idx',gidx_col='bondchain'):
|
|
113
|
+
# overwrites whole thing
|
|
114
|
+
self.chains=[]
|
|
115
|
+
heads=D[D[lidx_col]==0].index+1 # always!
|
|
116
|
+
headchains=D[D[lidx_col]==0][gidx_col]
|
|
117
|
+
for h,hc in zip(heads,headchains):
|
|
118
|
+
self.chains.append(Chain(head=h,idx=hc))
|
|
119
|
+
self.chains.sort(key=lambda x: x.idx)
|
|
120
|
+
old_idx=[x.idx for x in self.chains]
|
|
121
|
+
self.reindex()
|
|
122
|
+
assert all([(x==y) for x,y in zip([x.idx for x in self.chains],list(range(len(self.chains))))])
|
|
123
|
+
next_idx=1
|
|
124
|
+
while next_idx<D.shape[0]:
|
|
125
|
+
if D[D[lidx_col]==next_idx].shape[0]==0:
|
|
126
|
+
break
|
|
127
|
+
next_ats=D[D[lidx_col]==next_idx].index+1 # always
|
|
128
|
+
next_atchains=D[D[lidx_col]==next_idx][gidx_col]
|
|
129
|
+
for a,ac in zip(next_ats,next_atchains):
|
|
130
|
+
acidx=old_idx.index(ac)
|
|
131
|
+
self.chains[acidx].idx_list.append(a)
|
|
132
|
+
next_idx+=1
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
@@ -22,15 +22,15 @@ from HTPolyNet.matrix4 import Matrix4
|
|
|
22
22
|
|
|
23
23
|
logger=logging.getLogger(__name__)
|
|
24
24
|
|
|
25
|
-
GRX_ATTRIBUTES =[ 'z','nreactions','reactantName','sea_idx','
|
|
25
|
+
GRX_ATTRIBUTES =[ 'z','nreactions','reactantName','sea_idx','bondchain','bondchain_idx','molecule','molecule_name']
|
|
26
26
|
"""Extended atom attributes
|
|
27
27
|
|
|
28
28
|
- 'z' number of sacrificial H's on atom
|
|
29
29
|
- 'nreactions' number of H's sacrificed so far to form bonds
|
|
30
30
|
- 'reactantName' name of most recent reactant to which atom belonged
|
|
31
31
|
- 'sea_idx' index of the group of symmetry-related atoms this atom belongs to (atoms with the same sea_idx in the same resid are considered symmetry-equivalent)
|
|
32
|
-
- '
|
|
33
|
-
- '
|
|
32
|
+
- 'bondchain' index of the unique bondchain this atom belongs to; a bondchain is a continuous linear chain of C-C bonds
|
|
33
|
+
- 'bondchain_idx' index of this atom within this chain
|
|
34
34
|
- 'molecule' index of the unique molecule this atom belongs to
|
|
35
35
|
- 'molecule_name' name of that molecule
|
|
36
36
|
"""
|
|
@@ -123,6 +123,7 @@ class CureController:
|
|
|
123
123
|
'late_threshold': 0.85,
|
|
124
124
|
'max_iterations': 100,
|
|
125
125
|
'desired_conversion': 0.5,
|
|
126
|
+
'min_allowable_bondcycle_length':-1, # not set
|
|
126
127
|
'ncpu' : os.cpu_count()
|
|
127
128
|
},
|
|
128
129
|
'drag': {
|
|
@@ -296,6 +297,7 @@ class CureController:
|
|
|
296
297
|
if self.state.step!=cure_step.cure_bondsearch: return
|
|
297
298
|
opfx=self._pfx()
|
|
298
299
|
d=self.dicts['controls']
|
|
300
|
+
TC.min_bondcycle_length=d['min_allowable_bondcycle_length']
|
|
299
301
|
self.state.current_radius=d['search_radius']+self.state.current_radidx*d['radial_increment']
|
|
300
302
|
logger.info(f'Bond search using radius {self.state.current_radius} nm initiated')
|
|
301
303
|
curr_conversion=self._curr_conversion()
|
|
@@ -732,7 +734,7 @@ class CureController:
|
|
|
732
734
|
# for ln in bdf.to_string().split('\n'):
|
|
733
735
|
# logger.debug(ln)
|
|
734
736
|
|
|
735
|
-
bdf=TC.
|
|
737
|
+
bdf=TC.bondcycle_collective(bdf)
|
|
736
738
|
logger.debug(f'{bdf[bdf["remove-to-uncyclize"]==True].shape[0]} out of {bdf.shape[0]} bonds removed to break nascent cycles')
|
|
737
739
|
bdf=bdf[bdf['remove-to-uncyclize']==False].copy().reset_index(drop=True)
|
|
738
740
|
# logger.debug('Non-cyclizing bonds:')
|
|
@@ -13,8 +13,8 @@ from HTPolyNet.reaction import reaction_stage, Reaction, ReactionList
|
|
|
13
13
|
|
|
14
14
|
logger=logging.getLogger(__name__)
|
|
15
15
|
|
|
16
|
-
def
|
|
17
|
-
"""
|
|
16
|
+
def bondchain_expand_reactions(molecules:MoleculeDict):
|
|
17
|
+
"""bondchain_expand_reactions handles generation of new reactions and molecular templates implied by any C-C bondchains
|
|
18
18
|
|
|
19
19
|
Note
|
|
20
20
|
----
|
|
@@ -31,45 +31,45 @@ def chain_expand_reactions(molecules:MoleculeDict):
|
|
|
31
31
|
dimer_lefts:MoleculeList=[]
|
|
32
32
|
dimer_rights:MoleculeList=[]
|
|
33
33
|
for mname,M in molecules.items():
|
|
34
|
-
if len(M.sequence)==1 and len(M.TopoCoord.
|
|
34
|
+
if len(M.sequence)==1 and len(M.TopoCoord.ChainManager.chains)>0 and M.generator==None and M.parentname==M.name:
|
|
35
35
|
monomers.append(M)
|
|
36
36
|
elif len(M.sequence)==2:
|
|
37
37
|
A=molecules[M.sequence[0]]
|
|
38
|
-
if len(A.TopoCoord.
|
|
38
|
+
if len(A.TopoCoord.ChainManager.chains)>0:
|
|
39
39
|
dimer_lefts.append(M)
|
|
40
40
|
A=molecules[M.sequence[1]]
|
|
41
|
-
if len(A.TopoCoord.
|
|
41
|
+
if len(A.TopoCoord.ChainManager.chains)>0:
|
|
42
42
|
dimer_rights.append(M)
|
|
43
43
|
for mon in monomers:
|
|
44
44
|
cnms=[]
|
|
45
|
-
for c in mon.TopoCoord.
|
|
46
|
-
cnms.append([mon.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':x}) for x in c])
|
|
47
|
-
logger.debug(f'Monomer {mon.name} has {len(mon.TopoCoord.
|
|
45
|
+
for c in mon.TopoCoord.ChainManager.chains:
|
|
46
|
+
cnms.append([mon.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':x}) for x in c.idx_list])
|
|
47
|
+
logger.debug(f'Monomer {mon.name} has {len(mon.TopoCoord.ChainManager.chains)} 2-chains: {[x for x in mon.TopoCoord.ChainManager.chains]} {cnms}')
|
|
48
48
|
|
|
49
49
|
for dim in dimer_lefts:
|
|
50
50
|
logger.debug(f'Dimer_left {dim.name} has sequence {dim.sequence}')
|
|
51
|
-
logger.debug(f'-> chains: {dim.TopoCoord.
|
|
52
|
-
for cl in dim.TopoCoord.
|
|
53
|
-
nl=[dim.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':x}) for x in cl]
|
|
51
|
+
logger.debug(f'-> chains: {[x for x in dim.TopoCoord.ChainManager.chains]}')
|
|
52
|
+
for cl in dim.TopoCoord.ChainManager.chains:
|
|
53
|
+
nl=[dim.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':x}) for x in cl.idx_list]
|
|
54
54
|
logger.debug(f' -> {nl}')
|
|
55
55
|
for dim in dimer_rights:
|
|
56
56
|
logger.debug(f'Dimer_right {dim.name} has sequence {dim.sequence}')
|
|
57
|
-
logger.debug(f'-> chains: {dim.TopoCoord.
|
|
58
|
-
for cl in dim.TopoCoord.
|
|
59
|
-
nl=[dim.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':x}) for x in cl]
|
|
57
|
+
logger.debug(f'-> chains: {[x for x in dim.TopoCoord.ChainManager.chains]}')
|
|
58
|
+
for cl in dim.TopoCoord.ChainManager.chains:
|
|
59
|
+
nl=[dim.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':x}) for x in cl.idx_list]
|
|
60
60
|
logger.debug(f' -> {nl}')
|
|
61
61
|
|
|
62
62
|
# monomer head attacks dimer tail
|
|
63
63
|
MD=product(monomers,dimer_lefts)
|
|
64
64
|
for m,d in MD:
|
|
65
|
-
for mb in m.TopoCoord.
|
|
66
|
-
h_idx=mb[0]
|
|
65
|
+
for mb in m.TopoCoord.ChainManager.chains:
|
|
66
|
+
h_idx=mb.idx_list[0]
|
|
67
67
|
h_name=m.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':h_idx})
|
|
68
|
-
# by definition, the dimer must have one
|
|
68
|
+
# by definition, the dimer must have one C-C bondchain of length 4
|
|
69
69
|
D4=[]
|
|
70
|
-
for dc in d.TopoCoord.
|
|
71
|
-
if len(dc)==4:
|
|
72
|
-
D4.append(dc)
|
|
70
|
+
for dc in d.TopoCoord.ChainManager.chains:
|
|
71
|
+
if len(dc.idx_list)==4:
|
|
72
|
+
D4.append(dc.idx_list)
|
|
73
73
|
for DC in D4:
|
|
74
74
|
t_idx=DC[-1]
|
|
75
75
|
t_name=d.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':t_idx})
|
|
@@ -93,14 +93,14 @@ def chain_expand_reactions(molecules:MoleculeDict):
|
|
|
93
93
|
# dimer head attacks monomer tail
|
|
94
94
|
MD=product(monomers,dimer_rights)
|
|
95
95
|
for m,d in MD:
|
|
96
|
-
for mb in m.TopoCoord.
|
|
97
|
-
assert len(mb)==2,f'monomer {m.name} has a
|
|
98
|
-
t_idx=mb[-1]
|
|
96
|
+
for mb in m.TopoCoord.ChainManager.chains:
|
|
97
|
+
assert len(mb.idx_list)==2,f'monomer {m.name} has a bondchain that is not length-2 -- this is IMPOSSIBLE'
|
|
98
|
+
t_idx=mb.idx_list[-1]
|
|
99
99
|
t_name=m.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':t_idx})
|
|
100
100
|
D4=[]
|
|
101
|
-
for dc in d.TopoCoord.
|
|
102
|
-
if len(dc)==4:
|
|
103
|
-
D4.append(dc)
|
|
101
|
+
for dc in d.TopoCoord.ChainManager.chains:
|
|
102
|
+
if len(dc.idx_list)==4:
|
|
103
|
+
D4.append(dc.idx_list)
|
|
104
104
|
for DC in D4:
|
|
105
105
|
h_idx=DC[0]
|
|
106
106
|
h_name=d.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':h_idx})
|
|
@@ -126,11 +126,11 @@ def chain_expand_reactions(molecules:MoleculeDict):
|
|
|
126
126
|
DD=product(dimer_rights,dimer_lefts)
|
|
127
127
|
for dr,dl in DD:
|
|
128
128
|
''' head of dr attacks tail of dl '''
|
|
129
|
-
for cr,cl in product(dr.TopoCoord.
|
|
130
|
-
if len(cr)==4 and len(cl)==4:
|
|
131
|
-
h_idx=cr[0]
|
|
129
|
+
for cr,cl in product(dr.TopoCoord.ChainManager.chains,dl.TopoCoord.ChainManager.chains):
|
|
130
|
+
if len(cr.idx_list)==4 and len(cl.idx_list)==4:
|
|
131
|
+
h_idx=cr.idx_list[0]
|
|
132
132
|
h_name=dr.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':h_idx})
|
|
133
|
-
t_idx=cl[-1]
|
|
133
|
+
t_idx=cl.idx_list[-1]
|
|
134
134
|
t_name=dl.TopoCoord.get_gro_attribute_by_attributes('atomName',{'globalIdx':t_idx})
|
|
135
135
|
new_mname=f'{dr.name}~{h_name}={t_name}~{dl.name}'
|
|
136
136
|
'''construct reaction'''
|
|
@@ -22,6 +22,7 @@ from HTPolyNet.ambertools import GAFFParameterize
|
|
|
22
22
|
from HTPolyNet.gromacs import mdp_modify,gro_from_trr
|
|
23
23
|
from HTPolyNet.command import Command
|
|
24
24
|
from HTPolyNet.reaction import Reaction, ReactionList, reaction_stage, generate_product_name, reactant_resid_to_presid
|
|
25
|
+
from HTPolyNet.chain import ChainManager
|
|
25
26
|
|
|
26
27
|
logger=logging.getLogger(__name__)
|
|
27
28
|
|
|
@@ -127,7 +128,7 @@ class Molecule:
|
|
|
127
128
|
self.bond_templates:BondTemplateList=[]
|
|
128
129
|
self.symmetry_relateds=[]
|
|
129
130
|
self.stereocenters=[] # list of atomnames
|
|
130
|
-
self.stereoisomers
|
|
131
|
+
self.stereoisomers={}
|
|
131
132
|
self.nconformers=0
|
|
132
133
|
self.conformers_dict={}
|
|
133
134
|
self.conformers=[] # just a list of gro file basenames
|
|
@@ -285,13 +286,6 @@ class Molecule:
|
|
|
285
286
|
TC=self.TopoCoord
|
|
286
287
|
TC.Topology.detect_rings()
|
|
287
288
|
logger.debug(f'Detected {len(TC.Topology.rings)} unique rings.')
|
|
288
|
-
# TC.idx_lists['cycle']=[]
|
|
289
|
-
# cycle_dict=TC.Topology.detect_cycles()
|
|
290
|
-
# logger.debug(f'Cycle dict: {cycle_dict}')
|
|
291
|
-
# for l,cs_of_l in cycle_dict.items():
|
|
292
|
-
# TC.idx_lists['cycle'].extend(cs_of_l)
|
|
293
|
-
# logger.debug('Resetting cycle and cycle_idx')
|
|
294
|
-
# TC.reset_grx_attributes_from_idx_list('cycle')
|
|
295
289
|
logger.debug('Done')
|
|
296
290
|
|
|
297
291
|
def initialize_monomer_grx_attributes(self):
|
|
@@ -303,7 +297,7 @@ class Molecule:
|
|
|
303
297
|
TC.set_gro_attribute('nreactions',0)
|
|
304
298
|
TC.set_gro_attribute('molecule',1)
|
|
305
299
|
TC.set_gro_attribute('molecule_name',self.name)
|
|
306
|
-
for att in ['sea_idx','
|
|
300
|
+
for att in ['sea_idx','bondchain','bondchain_idx']:
|
|
307
301
|
TC.set_gro_attribute(att,-1)
|
|
308
302
|
# set symmetry class indices
|
|
309
303
|
sea_idx=1
|
|
@@ -333,8 +327,8 @@ class Molecule:
|
|
|
333
327
|
idx.append(TC.get_gro_attribute_by_attributes('globalIdx',{'atomName':bn,'resNum':rnum}))
|
|
334
328
|
TC.set_gro_attribute_by_attributes('z',z,{'atomName':bn,'resNum':rnum})
|
|
335
329
|
|
|
336
|
-
#
|
|
337
|
-
TC.
|
|
330
|
+
# TC.idx_lists['bondchain']=[]
|
|
331
|
+
TC.ChainManager=ChainManager(create_if_missing=True)
|
|
338
332
|
pairs=product(idx,idx)
|
|
339
333
|
for i,j in pairs:
|
|
340
334
|
if i<j:
|
|
@@ -359,8 +353,10 @@ class Molecule:
|
|
|
359
353
|
logger.warning(f'In molecule {self.name}, cannot identify bonded reactive head and tail atoms\nAssuming {j} is head and {i} is tail')
|
|
360
354
|
entry=[j,i]
|
|
361
355
|
# logger.debug(f'Adding {entry} to chainlist of {self.name}')
|
|
362
|
-
TC.
|
|
363
|
-
|
|
356
|
+
TC.ChainManager.injest_bond(entry[0],entry[1])
|
|
357
|
+
# TC.idx_lists['bondchain'].append(entry)
|
|
358
|
+
# TC.reset_grx_attributes_from_idx_list('bondchain')
|
|
359
|
+
TC.ChainManager.to_dataframe(TC.Coordinates.A)
|
|
364
360
|
self.initialize_molecule_rings()
|
|
365
361
|
|
|
366
362
|
def previously_parameterized(self):
|
|
@@ -548,7 +544,7 @@ class Molecule:
|
|
|
548
544
|
self.reaction_bonds=[]
|
|
549
545
|
self.bond_templates=[]
|
|
550
546
|
TC=self.TopoCoord
|
|
551
|
-
# logger.debug(f'prepare_new_bonds {self.name}: chainlists {TC.idx_lists["
|
|
547
|
+
# logger.debug(f'prepare_new_bonds {self.name}: chainlists {TC.idx_lists["bondchain"]}')
|
|
552
548
|
for bondrec in R.bonds:
|
|
553
549
|
atom_keys=bondrec['atoms']
|
|
554
550
|
order=bondrec['order']
|
|
@@ -898,7 +894,7 @@ class Molecule:
|
|
|
898
894
|
overall_maximum=(-1.e9,-1,-1)
|
|
899
895
|
coord_trials={}
|
|
900
896
|
for myH,myHnm in myHpartners.items(): # keys are globalIdx's, values are names
|
|
901
|
-
coord_trials[myH]
|
|
897
|
+
coord_trials[myH]={}
|
|
902
898
|
Rh=TC.get_R(myH)
|
|
903
899
|
logger.debug(f' Rh {myH} {Rh} {Rh.dtype}')
|
|
904
900
|
Rih=Ri-Rh
|
|
@@ -22,7 +22,7 @@ import HTPolyNet.checkpoint as cp
|
|
|
22
22
|
from HTPolyNet.plot import trace
|
|
23
23
|
from HTPolyNet.molecule import Molecule, MoleculeDict
|
|
24
24
|
from HTPolyNet.reaction import is_reactant
|
|
25
|
-
from HTPolyNet.expandreactions import
|
|
25
|
+
from HTPolyNet.expandreactions import bondchain_expand_reactions
|
|
26
26
|
from HTPolyNet.reaction import reaction_stage
|
|
27
27
|
from HTPolyNet.curecontroller import CureController, CureState
|
|
28
28
|
from HTPolyNet.stringthings import my_logger
|
|
@@ -196,10 +196,10 @@ class Runtime:
|
|
|
196
196
|
self.molecules[mname]=M
|
|
197
197
|
''' Generate any required template products that result from reactions in which the bond generated creates
|
|
198
198
|
dihedrals that span more than just the two monomers that are connected '''
|
|
199
|
-
new_reactions,new_molecules=
|
|
199
|
+
new_reactions,new_molecules=bondchain_expand_reactions(self.molecules)
|
|
200
200
|
if len(new_molecules)>0:
|
|
201
201
|
ess='' if len(new_molecules)==1 else 's'
|
|
202
|
-
logger.info(f'{len(new_molecules)} molecule{ess} implied by
|
|
202
|
+
logger.info(f'{len(new_molecules)} molecule{ess} implied by C-C bondchains')
|
|
203
203
|
ml=list(new_molecules.keys())
|
|
204
204
|
# logger.info(ml)
|
|
205
205
|
self.cfg.reactions.extend(new_reactions)
|
|
@@ -429,7 +429,7 @@ class Runtime:
|
|
|
429
429
|
logger.debug(f'Fetching parameterized {mname}')
|
|
430
430
|
exts=pfs.fetch_molecule_files(mname)
|
|
431
431
|
logger.debug(f'fetched {mname} exts {exts}')
|
|
432
|
-
M.load_top_gro(f'{mname}.top',f'{mname}.gro',mol2filename='',wrap_coords=False)
|
|
432
|
+
M.load_top_gro(f'{mname}.top',f'{mname}.gro',tpxfilename=f'{mname}.tpx',mol2filename='',wrap_coords=False)
|
|
433
433
|
M.TopoCoord.read_gro_attributes(f'{mname}.grx')
|
|
434
434
|
M.set_sequence_from_coordinates()
|
|
435
435
|
if M.generator:
|
|
@@ -599,8 +599,7 @@ class Runtime:
|
|
|
599
599
|
TC.atom_count()
|
|
600
600
|
TC.set_grx_attributes()
|
|
601
601
|
TC.inherit_grx_attributes_from_molecules(self.cfg.molecules,self.cfg.initial_composition)
|
|
602
|
-
|
|
603
|
-
TC.reset_idx_list_from_grx_attributes(list_name)
|
|
602
|
+
TC.ChainManager.from_dataframe(TC.Coordinates.A)
|
|
604
603
|
TC.make_resid_graph()
|
|
605
604
|
TC.write_grx_attributes(f'{inpfnm}.grx')
|
|
606
605
|
logger.info(f'Coordinates "{inpfnm}.gro" in {pfs.cwd()}')
|