Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRenaud committed Apr 10, 2020
1 parent 1564d11 commit ffc29f4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 44 deletions.
14 changes: 1 addition & 13 deletions deeprank/features/BSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,7 @@ def get_contact_residue_sasa(self, cutoff=5.5):
# define the xyz key : (chain,x,y,z)
chain = {'A': 0, 'B': 1}[res[0]]

# atcenter = 'CB'
# if res[2] == 'GLY':
# atcenter = 'CA'

# try :
# xyz = self.sql.get(
# 'x,y,z', resSeq=res[1], chainID=res[0], name=atcenter)[0]
# except IndexError :
# warnings.warn('Atom ', atcenter, ' not found for residue ', key[1], \
# '. Use residue center as feature center')
# xyz = np.mean(self.sql.get('x,y,z',resSeq=res[1],chainID=res[0]),0)
# xyzkey = tuple([chain] + xyz)

# get the center
_, xyz = self.get_residue_center(self.sql, res=res)
xyzkey = tuple([chain] + xyz[0])

Expand Down
15 changes: 0 additions & 15 deletions deeprank/features/FullPSSM.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ def get_feature_value(self, cutoff=5.5):
sql = pdb2sql.interface(self.pdb_file)

# set achors for all residues and get their xyz
# xyz_info = sql.get('chainID,resSeq,resName', name='CB')
# xyz_info += sql.get('chainID,resSeq,resName', name='CA',
# resName='GLY')
# xyz = sql.get('x,y,z', name='CB')
# xyz += sql.get('x,y,z', name='CA', resName='GLY')

xyz_info, xyz = self.get_residue_center(sql)

xyz_dict = {}
Expand Down Expand Up @@ -214,15 +208,6 @@ def get_feature_value(self, cutoff=5.5):
f" no pssm value:\n {ctc_res_wo_pssm}"
)

# elif len(pssm_res_set.difference(ctc_res_set)) > 0:
# # can happen if CA/CB is missing in the res
# pssm_res_wo_ctc = pssm_res_set.difference(ctc_res_set)
# ctc_res_with_pssm = pssm_res_set.intersection(ctc_res_set)
# warnings.warn(
# f"{self.mol_name}: The following interface residues have "
# f" a CA or CB missing :\n {pssm_res_wo_ctc}"
# )

else:
ctc_res_with_pssm = ctc_res

Expand Down
16 changes: 1 addition & 15 deletions deeprank/features/ResidueDensity.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,7 @@ def extract_features(self):
# total density in raw format
self.feature_data['RCD_total'][key] = [res.density['total']]

# # get the type of the center
# atcenter = 'CB'
# if key[2] == 'GLY':
# atcenter = 'CA'

# # get the xyz of the center atom
# try:
# xyz = self.sql.get(
# 'x,y,z', resSeq=key[1], chainID=key[0], name=atcenter)[0]
# except IndexError :
# warnings.warn('Atom ', atcenter, ' not found for residue ', key[1], \
# '. Use residue center as feature center')
# xyz = np.mean(self.sql.get('x,y,z',resSeq=key[1],chainID=key[0]),0).tolist()
# xyz_key = tuple([{'A': 0, 'B': 1}[key[0]]] + xyz)

# get the center
_, xyz = self.get_residue_center(self.sql, res=key)
xyz_key = tuple([{'A': 0, 'B': 1}[key[0]]] + xyz[0])

Expand Down
1 change: 0 additions & 1 deletion deeprank/generate/DataGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ def create_database(

# names of the molecule
mol_name = os.path.splitext(os.path.basename(cplx))[0]
#mol_name = mol_name.replace('-', '_')
mol_aug_name_list = []

try:
Expand Down

0 comments on commit ffc29f4

Please sign in to comment.