You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates to the side chain move class that facilitate identification of dihedral atom indices (without manual entry) as well as target rotamer bins (based on an input rotpref.yaml file)
@khburley Your PR looks good for the most part, except some of your tests are failing. The output makes it seem like the test fails because getRotBondAtoms() can't find the rotpref.yml file.
blues/moves.py:763: FileNotFoundError
_____________________ SideChainTester.test_sidechain_move ______________________
self = <blues.tests.test_sidechain.SideChainTester testMethod=test_sidechain_move>
def setUp(self):
# Obtain topologies/positions
prmtop = utils.get_data_filename('blues', 'tests/data/vacDivaline.prmtop')
inpcrd = utils.get_data_filename('blues', 'tests/data/vacDivaline.inpcrd')
self.struct = parmed.load_file(prmtop, xyz=inpcrd)
> self.sidechain = SideChainMove(self.struct, [1])
blues/tests/test_sidechain.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
blues/moves.py:482: in __init__
self.rot_atoms, self.rot_bonds, self.qry_atoms = self.getRotBondAtoms()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <blues.moves.SideChainMove object at 0x7f6f4da537f0>
def getRotBondAtoms(self):
"""This function is called on class initialization.
Takes in a PDB filename (as a string) and list of residue numbers. Returns
a nested dictionary of rotatable bonds (containing only heavy atoms), that are keyed by residue number,
then keyed by bond pointer, containing values of atom indicies [axis1, axis2, atoms to be rotated]
Note: The atom indicies start at 0, and are offset by -1 from the PDB file indicies
Returns
-------
rot_atoms : dict
Dictionary of residues, bonds and atoms to be rotated
rot_bonds : dict of oechem.OEBondBase
Dictionary containing the bond pointers of the rotatable bonds.
qry_atoms : dict of oechem.OEAtomBase
Dictionary containing all the atom pointers (as OpenEye objects) that
make up the given residues.
"""
backbone_atoms = self.getBackboneAtoms(self.molecule)
# Generate dictionary containing locations and indicies of heavy residue atoms
#print('Dictionary of all query atoms generated from residue list\n')
qry_atoms, backbone_atoms = self.getTargetAtoms(self.molecule, backbone_atoms, self.residue_list)
# Identify bonds containing query atoms and return dictionary of indicies
rot_bonds = self.findHeavyRotBonds(self.molecule, qry_atoms)
# Generate dictionary of residues, bonds and atoms to be rotated
rot_atoms = self.getRotAtoms(rot_bonds, self.molecule, backbone_atoms)
# Read in yaml file
> rotfile = open('rotpref.yml',"r")
E FileNotFoundError: [Errno 2] No such file or directory: 'rotpref.yml'
Maybe you can use the blues.utils.get_data_filename() function to get the path to the rotpref.yml file in the package to get around that.
@davidlmobley
This PR can be merge it adds functionality by enabling rotamer-biased side chain rotations via a bias_range parameter and introduces acceptance_ratio tracking at the move level. It introduces acceptance_ratio as a per-move parameter to optionally skip NCMC integration if a move is known to be unproductive (e.g., rotamer rejection in SideChainMove). This improves efficiency and lays groundwork for adaptive or diagnostic sampling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates to the side chain move class that facilitate identification of dihedral atom indices (without manual entry) as well as target rotamer bins (based on an input rotpref.yaml file)
Status