Commit 5a537763 authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Cleanup

parent 3cd38948
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -248,8 +248,6 @@ class NeighborListAtomicCoordinates(Featurizer):
        
    return (bohr_coords, neighbor_list)

# TODO(rbharath): This shares a lot of code with NeighborListAtomicCoordinates.
# Is there some elegant way to refactor to avoid code duplication?
class NeighborListComplexAtomicCoordinates(ComplexFeaturizer):
  """
  Adjacency list of neighbors for protein-ligand complexes in 3-space.
+0 −13
Original line number Diff line number Diff line
@@ -51,35 +51,22 @@ def load_molecule(molecule_file, remove_hydrogens=True,
  """

  if ".mol2" in molecule_file:
    ###################################################### DEBUG
    print("mol2 file")
    ###################################################### DEBUG
    obConversion = ob.OBConversion()
    obConversion.SetInAndOutFormats(str("mol2"), str("mol2"))
    ob_mol = ob.OBMol()
    obConversion.ReadFile(ob_mol, str(molecule_file))
  elif ".sdf" in molecule_file:
    ###################################################### DEBUG
    print("sdf file")
    ###################################################### DEBUG
    obConversion = ob.OBConversion()
    obConversion.SetInAndOutFormats(str("sdf"), str("sdf"))
    ob_mol = ob.OBMol()
    obConversion.ReadFile(ob_mol, str(molecule_file))
  elif ".pdb" in molecule_file:
    ###################################################### DEBUG
    print("pdb file")
    ###################################################### DEBUG
    obConversion = ob.OBConversion()
    obConversion.SetInAndOutFormats(str("pdb"), str("pdb"))
    ob_mol = ob.OBMol()
    obConversion.ReadFile(ob_mol, str(molecule_file))
  else:
    raise ValueError("Unrecognized file type")
  ###################################################### DEBUG
  print("ob_mol.NumAtoms()")
  print(ob_mol.NumAtoms())
  ###################################################### DEBUG

  if calc_charges:
    gasteiger = ob.OBChargeModel.FindType(str("gasteiger"))
+0 −0

File moved.

Loading