Get acceptor atoms#
import molsysmt as msm
msm.hbonds.acceptor_inclusion_rules
["atom_type=='O'", "atom_type=='N'", "atom_type=='S'"]
msm.hbonds.acceptor_exclusion_rules
["atom_name=='NE2' and group_name=='GLN'",
"(atom_name=='NE2' and group_name=='HIS') bonded to (atom_type=='H')",
"(atom_name=='ND1' and group_name=='HIS') bonded to (atom_type=='H')"]
molsys = msm.convert(msm.systems['chicken villin HP35']['chicken_villin_HP35.h5msm'])
acceptor_atoms = msm.hbonds.get_acceptor_atoms(molsys, selection="group_index==[1,2,3]")
acceptor_atoms
array([ 6, 11, 18, 23, 28, 42, 47, 51])
msm.info(molsys, element='atom', selection=acceptor_atoms)
index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | N | N | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
11 | 12 | O | O | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
18 | 19 | SD | S | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
23 | 24 | N | N | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
28 | 29 | O | O | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
42 | 43 | N | N | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
47 | 48 | O | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
51 | 52 | OG | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
acceptor_atoms = msm.hbonds.get_acceptor_atoms(molsys, selection="group_index==[1,2,3]",
inclusion_rules="atom_type=='O'", exclusion_rules="atom_name=='OG'",
default_inclusion_rules=False, default_exclusion_rules=False)
msm.info(molsys, element='atom', selection=acceptor_atoms)
index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | 12 | O | O | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
28 | 29 | O | O | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
47 | 48 | O | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
acceptor_atoms = msm.hbonds.get_acceptor_atoms(molsys, selection="group_index==[1,2,3]",
inclusion_rules="atom_type=='CA' and group_name=='MET'", exclusion_rules="atom_name=='OG'")
msm.info(molsys, element='atom', selection=acceptor_atoms)
index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | N | N | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
11 | 12 | O | O | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
18 | 19 | SD | S | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
23 | 24 | N | N | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
28 | 29 | O | O | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
42 | 43 | N | N | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
47 | 48 | O | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
msm.hbonds.acceptor_inclusion_rules.append("atom_name=='CA'")
msm.hbonds.acceptor_inclusion_rules
["atom_type=='O'", "atom_type=='N'", "atom_type=='S'", "atom_name=='CA'"]
acceptor_atoms = msm.hbonds.get_acceptor_atoms(molsys, selection="group_index==[1,2,3]")
msm.info(molsys, element='atom', selection=acceptor_atoms)
index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | 7 | N | N | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
8 | 9 | CA | C | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
11 | 12 | O | O | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
18 | 19 | SD | S | 1 | 41 | MET | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
23 | 24 | N | N | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
25 | 26 | CA | C | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
28 | 29 | O | O | 2 | 42 | LEU | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
42 | 43 | N | N | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
44 | 45 | CA | C | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
47 | 48 | O | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |
51 | 52 | OG | O | 3 | 43 | SER | amino acid | 0 | 0 | 0 | peptide | 0 | VILLIN |