Skip to content

Commit

Permalink
use all atoms; to be consistent with the paper
Browse files Browse the repository at this point in the history
  • Loading branch information
RodenLuo committed Sep 30, 2024
1 parent 15a5aae commit d3398b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
14 changes: 3 additions & 11 deletions src/DiffAtomComp.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,26 +452,18 @@ def read_file_and_get_coordinates(file_path):

# Initialize a list to hold all atom coordinates
all_atom_coordinates = []
backbone_coords = []
backbone_chains = []

backbone_atoms = ['N', 'CA', 'C', 'O']

# Iterate through each model, chain, and residue in the structure to get atoms
for model in structure:
for chain in model:
chain_id = chain.get_id()
for residue in chain:
for atom in residue:
if atom.get_name() in backbone_atoms:
# Append the atom's coordinates to the list
backbone_coords.append(atom.get_coord())
# backbone_chains.append(chain_id)

# interp_backbone_coords = interp_backbone(backbone_coords, backbone_chains)
# Append the atom's coordinates to the list
all_atom_coordinates.append(atom.get_coord())

# Return the numpy array of coordinates
return np.array(backbone_coords)
return np.array(all_atom_coordinates)


def pad_and_convert_to_tensor(atom_coords_list, device):
Expand Down
6 changes: 1 addition & 5 deletions src/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,11 +1206,7 @@ def single_fit_button_clicked(self):
from chimerax.map.molmap import molecule_map
mol_vol = molecule_map(self.session, mol.atoms, self._single_fit_res.value(), grid_spacing=self.fit_vol.data.step[0])

backbone_atoms = ['N', 'CA', 'C', 'O']
is_backbone = np.isin(mol.atoms.names, backbone_atoms)

input_coords = mol.atoms.scene_coords[is_backbone]
# input_coords = mol.atoms.scene_coords
input_coords = mol.atoms.scene_coords

# Fit
timer_start = datetime.now()
Expand Down

0 comments on commit d3398b0

Please sign in to comment.