HTPolyNet 1.0.7.3__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.7.3 → htpolynet-1.0.9}/.github/workflows/sphinx.yml +1 -1
- htpolynet-1.0.9/HTPolyNet/__init__.py +1 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/banner.py +7 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/bondlist.py +4 -6
- htpolynet-1.0.9/HTPolyNet/chain.py +135 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/coordinates.py +49 -20
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/curecontroller.py +4 -1
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/dataframetools.py +25 -21
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/driver.py +12 -5
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/expandreactions.py +30 -30
- htpolynet-1.0.9/HTPolyNet/matrix4.py +110 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/molecule.py +42 -78
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/projectfilesystem.py +1 -1
- htpolynet-1.0.9/HTPolyNet/resources/example_depot/0-liquid-styrene.tgz +0 -0
- htpolynet-1.0.9/HTPolyNet/resources/example_depot/1-polystyrene.tgz +0 -0
- htpolynet-1.0.9/HTPolyNet/resources/example_depot/2-polymethylstyrene.tgz +0 -0
- htpolynet-1.0.9/HTPolyNet/resources/example_depot/3-bisgma-styrene-thermoset.tgz +0 -0
- htpolynet-1.0.9/HTPolyNet/resources/example_depot/4-pacm-dgeba-epoxy-thermoset.tgz +0 -0
- htpolynet-1.0.9/HTPolyNet/resources/example_depot/5-dfda-fde-epoxy-thermoset.tgz +0 -0
- htpolynet-1.0.9/HTPolyNet/ring.py +293 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/runtime.py +14 -13
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/software.py +0 -1
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/topocoord.py +451 -209
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/topology.py +73 -131
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/PKG-INFO +14 -7
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/README.md +12 -5
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/HTPolyNetPackage.rst +4 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/conf.py +2 -2
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/configuration.rst +2 -0
- {htpolynet-1.0.7.3 → 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.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/results.rst +41 -39
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/run.rst +26 -6
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/introduction.rst +26 -15
- {htpolynet-1.0.7.3 → 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.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/results.rst +1 -1
- {htpolynet-1.0.7.3 → 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.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/results.rst +2 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/run.rst +112 -123
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/install.rst +9 -10
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/configs/configs-for-run.rst +15 -11
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/program-flow.rst +2 -2
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/pyproject.toml +2 -2
- htpolynet-1.0.9/tests/unit/test_chain.py +170 -0
- htpolynet-1.0.9/tests/unit/test_dataframetools.py +28 -0
- htpolynet-1.0.9/tests/unit/test_ring.py +175 -0
- htpolynet-1.0.9/tests/unit/test_topology/test.top +29474 -0
- htpolynet-1.0.9/tests/unit/test_topology.py +45 -0
- htpolynet-1.0.7.3/HTPolyNet/__init__.py +0 -1
- htpolynet-1.0.7.3/HTPolyNet/resources/example_depot/0-liquid-styrene.tgz +0 -0
- htpolynet-1.0.7.3/HTPolyNet/resources/example_depot/1-polystyrene.tgz +0 -0
- htpolynet-1.0.7.3/HTPolyNet/resources/example_depot/2-polymethylstyrene.tgz +0 -0
- htpolynet-1.0.7.3/HTPolyNet/resources/example_depot/3-bisgma-styrene-thermoset.tgz +0 -0
- htpolynet-1.0.7.3/HTPolyNet/resources/example_depot/4-pacm-dgeba-epoxy-thermoset.tgz +0 -0
- htpolynet-1.0.7.3/HTPolyNet/resources/example_depot/5-dfda-fde-epoxy-thermoset.tgz +0 -0
- htpolynet-1.0.7.3/HTPolyNet/ring.py +0 -155
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-anneal-T.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/postcure-postequilibration-density.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-anneal-T.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-postequilibration-density.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/precure-preequilibration-density.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/buildtraces.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/cure_info.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/buildtraces.png +0 -0
- htpolynet-1.0.7.3/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/cure_info.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/.gitignore +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/ambertools.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/analyze.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/bondtemplate.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/checkpoint.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/command.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/configuration.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/countTime.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/gromacs.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/inputcheck.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/linkcell.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/plot.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/postsim.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/reaction.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/README.md +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/__init__.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/DGE-PAC-hi.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/DGE-PAC-lo.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/FDE-DFDA-hi.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/FDE-DFDA-lo.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/GMASTY-hi.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/GMASTY-lo.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/README.md +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/STY.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pMSTY-hi.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pMSTY-lo.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pSTY-hi.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/cfg/pSTY-lo.yaml +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/README.md +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/drag-min.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/drag-npt.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/drag-nvt.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/min.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/npt.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/nvt.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/relax-min.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/relax-npt.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/relax-nvt.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/single-molecule-min.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/mdp/single-molecule-nvt.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/DFA.pdb +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/DGE.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/EMB.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/FDE.pdb +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/GMA.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/PAC.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/inputs/STY.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/make-monomers.sh +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/DFA.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/DGE.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/EMB.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/FDE.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/GMA.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/PAC.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/pics/STY.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/DFA.pdb +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/DGE.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/EMB.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/FDE.pdb +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/GMA.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/PAC.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/molecules/sample-inputs/STY.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/tcl/readbonds.tcl +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/tcl/readgrx.tcl +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/resources/tcl/render.tcl +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/stringthings.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/unused_symmetry_stuff.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/HTPolyNet/utils.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/LICENSE +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/MANIFEST.in +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/Makefile +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/README.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/requirements.txt +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/equil-rho_v_ns.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/postsim-typical.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-e.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-equil-rho_v_ns.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-rho_v_ns.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/prod-tg.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/rho_v_ns.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/short-e.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/postsim_analyses/pics/short-tg.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/files/EMB.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/monomer.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/4meb.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/EMB1_1_labelled.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/buildtraces.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/cure_info.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/densification-density.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/emb-labelled.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/global_traces.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/hi-pre.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/hi.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-1-cure_equilibrate-density.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-2-cap_equilibrate-density.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/iter-2-cure_equilibrate-density.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/mst-vinyl.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.eps +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.fig +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/pmsty_sys.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/pics/styrene-polymerization.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/1-polymethylstyrene/reactions.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/configuration.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/files/DGE.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/files/PAC.mol2 +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/DGE-epoxy.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/DGE-labelled.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/PAC-2d.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/PAC-labelled.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/densification-density.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dge-pac-cured.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dge-pac-liq.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.eps +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.fig +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/dgesys.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r1.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r2.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/pics/r3.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/2-DGEBA-PACM/reactions.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/configuration.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/introduction.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/BPA.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/GMA.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/HIE.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/densification-density.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.eps +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.fig +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/four_dimers.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/gma-sty-cured.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/gma-sty-liq.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/p1-traces.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.eps +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.fig +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/pics/vesys.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/3-VE-STY/reactions.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/example-tutorials/shortbuilds/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/references/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/references/mol2-reference.pdf +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/references.bib +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/CURE.odg +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/CURE.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/STY.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/STYCC.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/TypicalUsageFlow.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/bond_filter.odg +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/bond_filter.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/chemdoodle-2dsketcher-emb.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/chemdoodle-2dsketcher-styrene.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/configs/configs-for-analyze.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/configs/configs-for-postsim.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/configuration-files.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/flow1.odg +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/flow1.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/flow1yaml.odg +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/hydrogenated.eps +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/hydrogenated.fig +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/hydrogenated.png +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/index.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/molecular-structure-inputs.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/docs/source/user-guide/usage.rst +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/__init__.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/conftest.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/__init__.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/config1.gro +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/config1.top +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/config2.gro +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/config2.top +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/items31.edr +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/items43.edr +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/items45.edr +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/fixtures/short.mdp +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/test_gromacs_get_energy_menu.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/test_gromacs_gmx_energy_trace.py +0 -0
- {htpolynet-1.0.7.3 → htpolynet-1.0.9}/tests/unit/test_resources.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
HTPOLYNET_VERSION='1.0.8'
|
|
@@ -21,6 +21,13 @@ banner_message="""
|
|
|
21
21
|
|
|
22
22
|
Supported in part by Grants W911NF-17-2-0227
|
|
23
23
|
and W911NF-12-R-0011 from the US Army Research Lab
|
|
24
|
+
|
|
25
|
+
Please cite the HTPolyNet paper:
|
|
26
|
+
|
|
27
|
+
Ming Huang and Cameron F. Abrams, HTPolyNet: A general
|
|
28
|
+
system generator for all-atom molecular simulations of
|
|
29
|
+
amorphous crosslinked polymers, SoftwareX, vol. 21,
|
|
30
|
+
pp. 101303, 2023 (doi:10.1016/j.softx.2022.101303)
|
|
24
31
|
""".format(HTPOLYNET_VERSION)
|
|
25
32
|
def banner(logf):
|
|
26
33
|
my_logger(banner_message,logf,fill=' ',just='<')
|
|
@@ -192,14 +192,12 @@ class Bondlist:
|
|
|
192
192
|
return red
|
|
193
193
|
|
|
194
194
|
def graph(self):
|
|
195
|
-
"""graph generate a networkx
|
|
195
|
+
"""graph generate a networkx Graph object from the bondlist
|
|
196
196
|
|
|
197
|
-
:return: a networkx
|
|
198
|
-
:rtype: networkx.
|
|
197
|
+
:return: a networkx Graph object
|
|
198
|
+
:rtype: networkx.Graph
|
|
199
199
|
"""
|
|
200
|
-
g=nx.
|
|
201
|
-
N=len(self.B)
|
|
202
|
-
g.add_nodes_from(list(range(N)))
|
|
200
|
+
g=nx.Graph()
|
|
203
201
|
for i,n in self.B.items():
|
|
204
202
|
for j in n:
|
|
205
203
|
g.add_edge(i,j)
|
|
@@ -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
|
+
|
|
@@ -18,25 +18,24 @@ from HTPolyNet.bondlist import Bondlist
|
|
|
18
18
|
from HTPolyNet.linkcell import Linkcell
|
|
19
19
|
from HTPolyNet.ring import Ring,Segment
|
|
20
20
|
from HTPolyNet.dataframetools import *
|
|
21
|
+
from HTPolyNet.matrix4 import Matrix4
|
|
21
22
|
|
|
22
23
|
logger=logging.getLogger(__name__)
|
|
23
24
|
|
|
24
|
-
GRX_ATTRIBUTES =[ 'z','nreactions','reactantName','sea_idx','
|
|
25
|
+
GRX_ATTRIBUTES =[ 'z','nreactions','reactantName','sea_idx','bondchain','bondchain_idx','molecule','molecule_name']
|
|
25
26
|
"""Extended atom attributes
|
|
26
27
|
|
|
27
28
|
- 'z' number of sacrificial H's on atom
|
|
28
29
|
- 'nreactions' number of H's sacrificed so far to form bonds
|
|
29
30
|
- 'reactantName' name of most recent reactant to which atom belonged
|
|
30
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)
|
|
31
|
-
- '
|
|
32
|
-
- '
|
|
33
|
-
- 'chain' index of the unique chain this atom belongs to
|
|
34
|
-
- 'chain_idx' index of this atom within this chain
|
|
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
|
|
35
34
|
- 'molecule' index of the unique molecule this atom belongs to
|
|
36
35
|
- 'molecule_name' name of that molecule
|
|
37
36
|
"""
|
|
38
|
-
GRX_GLOBALLY_UNIQUE=[False, False, False, True, True,
|
|
39
|
-
GRX_UNSET_DEFAULTS =[ 0, 0, 'UNSET', -1, -1, -1,
|
|
37
|
+
GRX_GLOBALLY_UNIQUE=[False, False, False, True, True, False, True, False]
|
|
38
|
+
GRX_UNSET_DEFAULTS =[ 0, 0, 'UNSET', -1, -1, -1, -1, 'UNSET']
|
|
40
39
|
|
|
41
40
|
def dfrotate(df:pd.DataFrame,R):
|
|
42
41
|
"""dfrotate applies rotation matrix R to coordinates in dataframe
|
|
@@ -96,6 +95,7 @@ class Coordinates:
|
|
|
96
95
|
self.empty=True
|
|
97
96
|
self.box=np.zeros((3,3))
|
|
98
97
|
self.grx_attributes=GRX_ATTRIBUTES
|
|
98
|
+
self.parent=None
|
|
99
99
|
|
|
100
100
|
@classmethod
|
|
101
101
|
def read_gro(cls,filename,wrap_coords=True):
|
|
@@ -161,6 +161,7 @@ class Coordinates:
|
|
|
161
161
|
# logger.debug(ln)
|
|
162
162
|
if wrap_coords:
|
|
163
163
|
inst.wrap_coords()
|
|
164
|
+
# logger.debug(inst.A.dtypes)
|
|
164
165
|
return inst
|
|
165
166
|
|
|
166
167
|
@classmethod
|
|
@@ -248,6 +249,9 @@ class Coordinates:
|
|
|
248
249
|
inst.N=N
|
|
249
250
|
return inst
|
|
250
251
|
|
|
252
|
+
def claim_parent(self,parent):
|
|
253
|
+
self.parent=parent
|
|
254
|
+
|
|
251
255
|
def set_box(self,box:np.ndarray):
|
|
252
256
|
"""set_box Set the box size from box
|
|
253
257
|
|
|
@@ -381,7 +385,9 @@ class Coordinates:
|
|
|
381
385
|
self.linkcell.make_memberlists(self.A)
|
|
382
386
|
else:
|
|
383
387
|
self.set_atomset_attribute('linkcell_idx',-1*np.ones(self.A.shape[0]).astype(int))
|
|
384
|
-
|
|
388
|
+
# we only populate with atoms whose positions will be needed in interatomic
|
|
389
|
+
# distance calculations; these are those (a) in rings, or (b) are reactive
|
|
390
|
+
sc=self.subcoords(self.A[(self.A['globalIdx'].isin(self.parent.Topology.rings.all_atoms()))|(self.A['z']>0)].copy())
|
|
385
391
|
self.linkcell.populate(sc,ncpu=ncpu)
|
|
386
392
|
self.reconcile_subcoords(sc,'linkcell_idx')
|
|
387
393
|
if save:
|
|
@@ -558,10 +564,10 @@ class Coordinates:
|
|
|
558
564
|
else:
|
|
559
565
|
df=pd.read_csv(filename,sep='\s+',names=['globalIdx']+attributes,header=0)
|
|
560
566
|
attributes_read=attributes
|
|
561
|
-
logger.debug(f'Read from {filename}\n{df.head().to_string()}')
|
|
562
|
-
logger.debug(f'Merge:\n{self.A.head().to_string()}\nand\n{df.head().to_string()}')
|
|
567
|
+
# logger.debug(f'Read from {filename}\n{df.head().to_string()}')
|
|
568
|
+
# logger.debug(f'Merge:\n{self.A.head().to_string()}\nand\n{df.head().to_string()}')
|
|
563
569
|
self.A=self.A.merge(df,how='outer',on='globalIdx')
|
|
564
|
-
logger.debug(f'Result:\n{self.A.head().to_string()}')
|
|
570
|
+
# logger.debug(f'Result:\n{self.A.head().to_string()}')
|
|
565
571
|
return attributes_read
|
|
566
572
|
|
|
567
573
|
def set_atomset_attribute(self,attribute,srs):
|
|
@@ -675,6 +681,18 @@ class Coordinates:
|
|
|
675
681
|
if D<minD:
|
|
676
682
|
minD=D
|
|
677
683
|
return minD
|
|
684
|
+
|
|
685
|
+
def homog_trans(self,M:Matrix4,indices=[]):
|
|
686
|
+
"""applies homogeneous transformation matrix M [4x4] to coordinates
|
|
687
|
+
|
|
688
|
+
:param M: homogeneous transformation matrix
|
|
689
|
+
:type M: Matrix4
|
|
690
|
+
"""
|
|
691
|
+
df=self.A
|
|
692
|
+
for i,srow in df.iterrows():
|
|
693
|
+
if len(indices)==0 or (srow['globalIdx'] in indices):
|
|
694
|
+
ri=np.array(list(srow[['posX','posY','posZ']].values))
|
|
695
|
+
df.loc[i,'posX':'posZ']=M.transform(ri)
|
|
678
696
|
|
|
679
697
|
def rotate(self,R):
|
|
680
698
|
"""rotate Rotates all coordinate vectors by rotation matrix R
|
|
@@ -682,11 +700,13 @@ class Coordinates:
|
|
|
682
700
|
:param R: rotation matrix (3x3)
|
|
683
701
|
:type R: numpy.ndarray
|
|
684
702
|
"""
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
703
|
+
M=Matrix4(R)
|
|
704
|
+
self.homog_trans(M)
|
|
705
|
+
# sp=self.A[['posX','posY','posZ']]
|
|
706
|
+
# for i,srow in sp.iterrows():
|
|
707
|
+
# ri=srow.values
|
|
708
|
+
# newri=np.matmul(R,ri)
|
|
709
|
+
# self.A.loc[i,'posX':'posZ']=newri
|
|
690
710
|
|
|
691
711
|
def translate(self,L):
|
|
692
712
|
"""translate Translates all coordinate vectors by displacement vector L
|
|
@@ -694,9 +714,11 @@ class Coordinates:
|
|
|
694
714
|
:param L: displacement vector (nm)
|
|
695
715
|
:type L: numpy.ndarray
|
|
696
716
|
"""
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
717
|
+
M=Matrix4(L)
|
|
718
|
+
self.homog_trans(M)
|
|
719
|
+
# sp=self.A[['posX','posY','posZ']]
|
|
720
|
+
# for i,srow in sp.iterrows():
|
|
721
|
+
# self.A.loc[i,'posX':'posZ']=srow.values+L
|
|
700
722
|
|
|
701
723
|
def maxspan(self):
|
|
702
724
|
"""Returns dimensions of orthorhombic convex hull enclosing Coordinates
|
|
@@ -752,7 +774,14 @@ class Coordinates:
|
|
|
752
774
|
:rtype: numpy.ndarray(3,float)
|
|
753
775
|
"""
|
|
754
776
|
df=self.A
|
|
755
|
-
|
|
777
|
+
assert df['posX'].dtypes==float
|
|
778
|
+
assert df['posY'].dtypes==float
|
|
779
|
+
assert df['posZ'].dtypes==float
|
|
780
|
+
res=get_row_attribute(df,['posX','posY','posZ'],{'globalIdx':idx})
|
|
781
|
+
# logger.debug(f'get_R result from get_row_attribute is {res} with type {type(res)} dtype {res.dtype}')
|
|
782
|
+
res=res.to_numpy(dtype=float)
|
|
783
|
+
# logger.debug(f'...and after to_numpy(), it is {res} type {type(res)} dtype {res.dtype}')
|
|
784
|
+
return res
|
|
756
785
|
|
|
757
786
|
def get_atom_attribute(self,name,attributes):
|
|
758
787
|
"""get_atom_attribute return values of attributes listed in name from atoms specified by attribute:value pairs in attributes
|
|
@@ -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()
|
|
@@ -402,6 +404,7 @@ class CureController:
|
|
|
402
404
|
self._register_bonds(bonds_df,pairs_df,f'{opfx}-bonds.csv',bonds_are='unrelaxed')
|
|
403
405
|
TC.write_gro(f'{opfx}.gro')
|
|
404
406
|
TC.write_top(f'{opfx}.top')
|
|
407
|
+
TC.write_tpx(f'{opfx}.tpx')
|
|
405
408
|
TC.write_grx_attributes(f'{opfx}.grx')
|
|
406
409
|
if self.state.step==cure_step.cure_update:
|
|
407
410
|
self.state.step=cure_step.cure_relax
|
|
@@ -731,7 +734,7 @@ class CureController:
|
|
|
731
734
|
# for ln in bdf.to_string().split('\n'):
|
|
732
735
|
# logger.debug(ln)
|
|
733
736
|
|
|
734
|
-
bdf=TC.
|
|
737
|
+
bdf=TC.bondcycle_collective(bdf)
|
|
735
738
|
logger.debug(f'{bdf[bdf["remove-to-uncyclize"]==True].shape[0]} out of {bdf.shape[0]} bonds removed to break nascent cycles')
|
|
736
739
|
bdf=bdf[bdf['remove-to-uncyclize']==False].copy().reset_index(drop=True)
|
|
737
740
|
# logger.debug('Non-cyclizing bonds:')
|
|
@@ -11,6 +11,19 @@ import logging
|
|
|
11
11
|
|
|
12
12
|
logger=logging.getLogger(__name__)
|
|
13
13
|
|
|
14
|
+
def get_row(df:pd.DataFrame,attributes:dict):
|
|
15
|
+
"""return a pandas Series of the row that matches the attribute dict"""
|
|
16
|
+
assert all([k in df for k in attributes.keys()]),f'One or more keys not in dataframe'
|
|
17
|
+
ga={k:v for k,v in attributes.items() if k in df}
|
|
18
|
+
assert len(ga)>0,f'Cannot find row with attributes {attributes} in dataframe with {df.columns}'
|
|
19
|
+
sdf=df
|
|
20
|
+
for k,v in attributes.items():
|
|
21
|
+
sdf=sdf[sdf[k]==v]
|
|
22
|
+
# res=pd.Series(sdf.iloc[0,:])
|
|
23
|
+
# logger.debug(f'sdf dtypes {sdf.dtypes}')
|
|
24
|
+
# logger.debug(f'get_row returns series {res.to_string()} with dtypes {res.dtypes}')
|
|
25
|
+
return pd.Series(sdf.iloc[0,:])
|
|
26
|
+
|
|
14
27
|
def get_row_attribute(df:pd.DataFrame,name,attributes):
|
|
15
28
|
"""get_row_attribute returns a scalar value of attribute "name" in row
|
|
16
29
|
expected to be uniquely defined by attributes dict
|
|
@@ -24,19 +37,10 @@ def get_row_attribute(df:pd.DataFrame,name,attributes):
|
|
|
24
37
|
:return: value of attribute name
|
|
25
38
|
:rtype: scalar
|
|
26
39
|
"""
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
else:
|
|
32
|
-
name_in_df= name in df
|
|
33
|
-
assert name_in_df,f'Attribute(s) {name} not found'
|
|
34
|
-
c=[df[k] for k in ga]
|
|
35
|
-
V=list(ga.values())
|
|
36
|
-
l=[True]*df.shape[0]
|
|
37
|
-
for i in range(len(c)):
|
|
38
|
-
l = (l) & (c[i]==V[i])
|
|
39
|
-
return df[list(l)][name].values[0]
|
|
40
|
+
row=get_row(df,attributes)
|
|
41
|
+
# res=row[name]
|
|
42
|
+
# logger.debug(f'get_row_attribute of {name} returns {res} with type {type(res)}')
|
|
43
|
+
return row[name]
|
|
40
44
|
|
|
41
45
|
def get_row_as_string(df:pd.DataFrame,attributes):
|
|
42
46
|
"""get_row_as_string returns a scalar value of attribute "name" in row
|
|
@@ -51,8 +55,8 @@ def get_row_as_string(df:pd.DataFrame,attributes):
|
|
|
51
55
|
"""
|
|
52
56
|
ga={k:v for k,v in attributes.items() if k in df}
|
|
53
57
|
c=[df[k] for k in ga]
|
|
54
|
-
V=list(ga.values())
|
|
55
|
-
l=[True]*df.shape[0]
|
|
58
|
+
V=pd.Series(list(ga.values()))
|
|
59
|
+
l=pd.Series([True]*df.shape[0])
|
|
56
60
|
for i in range(len(c)):
|
|
57
61
|
l = (l) & (c[i]==V[i])
|
|
58
62
|
return df[list(l)].to_string()
|
|
@@ -73,8 +77,8 @@ def get_rows_w_attribute(df:pd.DataFrame,name,attributes:dict):
|
|
|
73
77
|
name_in_df= name in df
|
|
74
78
|
assert name_in_df,f'Attribute(s) {name} not found'
|
|
75
79
|
c=[df[k] for k in ga]
|
|
76
|
-
V=list(ga.values())
|
|
77
|
-
l=[True]*df.shape[0]
|
|
80
|
+
V=pd.Series(list(ga.values()))
|
|
81
|
+
l=pd.Series([True]*df.shape[0])
|
|
78
82
|
for i in range(len(c)):
|
|
79
83
|
l = (l) & (c[i]==V[i])
|
|
80
84
|
return df[list(l)][name].values
|
|
@@ -97,8 +101,8 @@ def set_row_attribute(df:pd.DataFrame,name,value,attributes):
|
|
|
97
101
|
logger.warning(f'Caller attempts to use unrecognized attributes to refer to row: {exla}')
|
|
98
102
|
if name in df and len(ga)>0:
|
|
99
103
|
c=[df[k] for k in ga]
|
|
100
|
-
V=list(ga.values())
|
|
101
|
-
l=[True]*df.shape[0]
|
|
104
|
+
V=pd.Series(list(ga.values()))
|
|
105
|
+
l=pd.Series([True]*df.shape[0])
|
|
102
106
|
for i in range(len(c)):
|
|
103
107
|
l = (l) & (c[i]==V[i])
|
|
104
108
|
cidx=[c==name for c in df.columns]
|
|
@@ -121,8 +125,8 @@ def set_rows_attributes_from_dict(df:pd.DataFrame,valdict,attributes):
|
|
|
121
125
|
logger.warning(f'using unknown attributes to refer to atom: {exla}')
|
|
122
126
|
if all([x in df for x in valdict]) and len(ga)>0:
|
|
123
127
|
c=[df[k] for k in ga]
|
|
124
|
-
V=list(ga.values())
|
|
125
|
-
l=[True]*df.shape[0]
|
|
128
|
+
V=pd.Series(list(ga.values()))
|
|
129
|
+
l=pd.Series([True]*df.shape[0])
|
|
126
130
|
for i in range(len(c)):
|
|
127
131
|
l = (l) & (c[i]==V[i])
|
|
128
132
|
for k,v in valdict.items():
|
|
@@ -137,11 +137,13 @@ def pack_example(args):
|
|
|
137
137
|
else:
|
|
138
138
|
use_n=True
|
|
139
139
|
n=args.n
|
|
140
|
+
overwrite=args.overwrite
|
|
140
141
|
existing_examples=l.get_example_names()
|
|
141
142
|
numbers=[int(x.split('-')[0]) for x in existing_examples]
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
if not overwrite:
|
|
144
|
+
assert not n in numbers,f'Choose an index other than {n}; an example with this index already exists.'
|
|
145
|
+
if not use_n:
|
|
146
|
+
assert not existing_n in numbers,f'Choose an index other than {n}; an example with this index already exists. To do this, rename the directory.'
|
|
145
147
|
if n==-1:
|
|
146
148
|
n=str(max(numbers)+1)
|
|
147
149
|
if use_n:
|
|
@@ -149,11 +151,15 @@ def pack_example(args):
|
|
|
149
151
|
else:
|
|
150
152
|
newname=f'{os.path.basename(os.getcwd())}'
|
|
151
153
|
depot_location=l.get_example_depot_location()
|
|
154
|
+
if overwrite and os.path.exists(f'{depot_location}/{newname}.tgz'):
|
|
155
|
+
logger.debug(f'Warning: overwriting example {depot_location}/{newname}.tgz')
|
|
152
156
|
os.chdir('..')
|
|
153
157
|
c=Command(f'tar --exclude="*/*/*/*/*" -zvcf {depot_location}/{newname}.tgz {bn}/README.md {bn}/run.sh {bn}/*.yaml {bn}/lib/molecules/')
|
|
154
158
|
o,e=c.run()
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
logger.debug(f'STDOUT')
|
|
160
|
+
logger.debug(o)
|
|
161
|
+
logger.debug(f'STDERR')
|
|
162
|
+
logger.debug(e)
|
|
157
163
|
|
|
158
164
|
def cli():
|
|
159
165
|
"""cli Command-line interface
|
|
@@ -228,6 +234,7 @@ def cli():
|
|
|
228
234
|
command_parsers['fetch-example'].add_argument('-k',default=False,action='store_true',help='keep tarballs')
|
|
229
235
|
######## pack-example
|
|
230
236
|
command_parsers['pack-example'].add_argument('-n',type=int,default=-1,help='desired index (integer) for this example')
|
|
237
|
+
command_parsers['pack-example'].add_argument('--overwrite',default=False,action='store_true',help='overwrite any existing example in the depot with this number')
|
|
231
238
|
######## input-check ########
|
|
232
239
|
command_parsers['input-check'].add_argument('config',type=str,default=None,help='input configuration file in YAML format')
|
|
233
240
|
command_parsers['input-check'].add_argument('-lib',type=str,default='lib',help='local user library of molecular structures and parameterizations')
|
|
@@ -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'''
|