Skip to content

AttributeError: 'numpy.int64' object has no attribute 'capitalize' #4

@pritam0070

Description

@pritam0070

When I try to run sample_for_pocket.ipynb with given Protein that is 2z3h.pub I got this error

AttributeError                            Traceback (most recent call last)
Cell In[38], line 2
      1 # pdb of pocket only (no ligand and only maximum 4A around the pocket)
----> 2 pocket_onehot, pocket_coords = get_pocket(pdb, pocket_atom_dict, remove_H=True, ca_only=False)
      4 # use fpocket to identify the protein pocket
      5 # NOTE: --------------------------
      6 # fpocket can sometimes give you the wrong pocket, make sure to check the output and visualize the pocket
      8 try:

Cell In[34], line 48, in get_pocket(pdbfile, pocket_atom_dict, remove_H, ca_only)
     46 print(type(aa))
     47 atom_onehot = np.eye(1, len(pocket_atom_dict), pocket_atom_dict[str(a).capitalize()]).squeeze()
---> 48 amino_onehot = np.eye(1, len(amino_acid_dict), amino_acid_dict[aa.capitalize()]).squeeze()
     49 is_backbone = 1 if full_atoms_names[i].capitalize() in ['N','CA','C','O'] else 0
     50 pocket_one_hot.append(np.concatenate([atom_onehot, amino_onehot, (is_backbone,)]))

AttributeError: 'numpy.int64' object has no attribute 'capitalize'

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions