Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of monomer bond lists in random builder #153

Open
cwalker7 opened this issue Oct 12, 2022 · 0 comments
Open

Order of monomer bond lists in random builder #153

cwalker7 opened this issue Oct 12, 2022 · 0 comments

Comments

@cwalker7
Copy link
Contributor

Figure out why this monomer definition fails to build with the random builder:

       monomer_dict = {
            "monomer_name": A,
            "particle_sequence": [b,sa,sb,sc],
            "bond_list": [[0,1],[1,3],[0,2]],
            "start": 0,
            "end": 0,
        }

And this one succeeds:

       monomer_dict = {
            "monomer_name": A,
            "particle_sequence": [b,sa,sb,sc],
            "bond_list": [[0,1],[0,2],[1,3]],
            "start": 0,
            "end": 0,
        }

Seems like the order matters when the monomers are parsed. This model has separate 2 sidechain and 1 sidechain connections to one backbone bead. Ideally it should work in both cases above. Details of the error for the first case are:

Traceback (most recent call last):
  File "/projects/chwa2399/software/anaconda/envs/cg_openmm_py39/lib/python3.9/site-packages/flow/project.py", line 3396, in _execute_operation
    self._operations[operation.name](*operation._jobs)
  File "/projects/chwa2399/software/anaconda/envs/cg_openmm_py39/lib/python3.9/site-packages/flow/project.py", line 630, in __call__
    return self._op_func(*jobs)
  File "/gpfs/alpine1/scratch/chwa2399/cg_openmm_signac_scans/helix_3sc_triangle_opt_111_exclusions_9_13_22/pitch_1_40_go_vary_bond_closures_10_6_22/2sc_diag_1sc/project.py", line 278, in signac_run_replica_exchange
    cgmodel_torsion_off = CGModel(
  File "/projects/chwa2399/software/anaconda/envs/cg_openmm_py39/lib/python3.9/site-packages/cg_openmm-1.0-py3.9.egg/cg_openmm/cg_model/cgmodel.py", line 282, in __init__
    self.positions = get_random_positions(self, use_library=use_structure_library)
  File "/projects/chwa2399/software/anaconda/envs/cg_openmm_py39/lib/python3.9/site-packages/cg_openmm-1.0-py3.9.egg/cg_openmm/utilities/random_builder.py", line 732, in get_random_positions
    trial_positions, placement = assign_position_lattice_style(
  File "/projects/chwa2399/software/anaconda/envs/cg_openmm_py39/lib/python3.9/site-packages/cg_openmm-1.0-py3.9.egg/cg_openmm/utilities/random_builder.py", line 289, in assign_position_lattice_style
    positions = np.insert(positions, bead_index, new_coordinates, axis=0) * positions.unit
  File "<__array_function__ internals>", line 180, in insert
  File "/projects/chwa2399/software/anaconda/envs/cg_openmm_py39/lib/python3.9/site-packages/numpy/lib/function_base.py", line 5280, in insert
    raise IndexError(f"index {obj} is out of bounds for axis {axis} "
IndexError: index 3 is out of bounds for axis 0 with size 2
Execute with '--show-traceback' or '--debug' to show the full traceback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant