Get donor atoms#

import molsysmt as msm
msm.hbonds.donor_inclusion_rules
["(atom_type=='O') bonded to (atom_type=='H')",
 "(atom_type=='N') bonded to (atom_type=='H')"]
 msm.hbonds.donor_exclusion_rules
["(atom_name=='NE2') not bonded to (atom_type=='H')",
 "(atom_name=='ND1') not bonded to (atom_type=='H')"]
molsys = msm.convert(msm.systems['chicken villin HP35']['chicken_villin_HP35.h5msm'])
donor_atoms = msm.hbonds.get_donor_atoms(molsys, selection="group_index==[1,2,3]")
donor_atoms
array([[ 6,  7],
       [23, 24],
       [42, 43],
       [51, 52]])
msm.info(molsys, element='atom', selection=donor_atoms[:,0])
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
23 24 N N 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
51 52 OG O 3 43 SER amino acid 0 0 0 peptide 0 VILLIN
msm.info(molsys, element='atom', selection=donor_atoms[:,1])
index id name type group index group id group name group type component index chain index molecule index molecule type entity index entity name
7 8 H H 1 41 MET amino acid 0 0 0 peptide 0 VILLIN
24 25 H H 2 42 LEU amino acid 0 0 0 peptide 0 VILLIN
43 44 H H 3 43 SER amino acid 0 0 0 peptide 0 VILLIN
52 53 HG H 3 43 SER amino acid 0 0 0 peptide 0 VILLIN
msm.info(molsys, element='atom', selection=donor_atoms[0])
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
7 8 H H 1 41 MET amino acid 0 0 0 peptide 0 VILLIN
donor_atoms = msm.hbonds.get_donor_atoms(molsys, selection="group_index==[1,2,3]",
                                         inclusion_rules="atom_name=='CB'", exclusion_rules="group_name=='SER'",
                                         default_inclusion_rules=False, default_exclusion_rules=False)
donor_atoms
array([[12, 13],
       [12, 14],
       [29, 30],
       [29, 31]])
msm.info(molsys, element='atom', selection=donor_atoms[0])
index id name type group index group id group name group type component index chain index molecule index molecule type entity index entity name
12 13 CB C 1 41 MET amino acid 0 0 0 peptide 0 VILLIN
13 14 HB2 H 1 41 MET amino acid 0 0 0 peptide 0 VILLIN
donor_atoms = msm.hbonds.get_donor_atoms(molsys, selection="group_index==[1,2,3]",
                                         inclusion_rules="atom_name=='CB'", exclusion_rules="group_name=='SER'")
msm.info(molsys, element='atom', selection=donor_atoms[:,0])
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
12 13 CB C 1 41 MET amino acid 0 0 0 peptide 0 VILLIN
12 13 CB C 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
29 30 CB C 2 42 LEU amino acid 0 0 0 peptide 0 VILLIN
29 30 CB C 2 42 LEU amino acid 0 0 0 peptide 0 VILLIN
msm.hbonds.donor_inclusion_rules.append("atom_name=='CB'")
msm.hbonds.donor_inclusion_rules
["(atom_type=='O') bonded to (atom_type=='H')",
 "(atom_type=='N') bonded to (atom_type=='H')",
 "atom_name=='CB'"]
donor_atoms = msm.hbonds.get_donor_atoms(molsys, selection="group_index==[1,2,3]")
msm.info(molsys, element='atom', selection=donor_atoms[:,0])
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
12 13 CB C 1 41 MET amino acid 0 0 0 peptide 0 VILLIN
12 13 CB C 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
29 30 CB C 2 42 LEU amino acid 0 0 0 peptide 0 VILLIN
29 30 CB C 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
48 49 CB C 3 43 SER amino acid 0 0 0 peptide 0 VILLIN
48 49 CB C 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