File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ def get_pdb_atoms(self):
99
99
# warning: calling this on cuda tensors is extremely slow
100
100
atom_asym_id = self .token_asym_id [self .atom_token_index ]
101
101
# atom level attributes
102
- atom_residue_index = self .token_residue_index [self .atom_token_index ]
102
+ atom_residue_index = (
103
+ self .token_residue_index [self .atom_token_index ] + 1
104
+ ) # residues are 1-indexed
103
105
atom_names = _tensor_to_atom_names (self .atom_ref_name_chars .unsqueeze (0 ))
104
106
atom_res_names = self .token_residue_names [self .atom_token_index ]
105
107
atom_res_names_strs = [
@@ -121,7 +123,7 @@ def get_pdb_atoms(self):
121
123
f"Too many chains for PDB file: { atom_asym_id [atom_index ].item ()} -- wrapping around"
122
124
)
123
125
atom = PDBAtom (
124
- record_type = "ATOM" ,
126
+ record_type = "ATOM" if not self . is_ligand else "HETATM" ,
125
127
atom_index = atom_index ,
126
128
atom_name = atom_names [atom_index ],
127
129
alt_loc = "" ,
You can’t perform that action at this time.
0 commit comments