Skip to content

Commit

Permalink
Remove uneeded code/attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ijpulidos committed Jul 27, 2023
1 parent dd9d164 commit 2e7aa04
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions perses/app/relative_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,6 @@ def _setup_complex_phase(self):
raise ValueError("You need to provide either a protein pdb or a receptor mol2 to run a complex simulation.")

self._complex_md_topology_old = self._receptor_md_topology_old.join(self._ligand_md_topology_old)
# receptor is the same for "old" and "new" -- only for small molecule pipeline
self._complex_md_topology_new = self._receptor_md_topology_old.join(self._ligand_md_topology_new)

n_atoms_spectators = 0
if self._spectator_filenames:
Expand All @@ -623,22 +621,14 @@ def _setup_complex_phase(self):
self._complex_md_topology_old = self._complex_md_topology_old.join(spectator_topology)
n_atoms_spectators += spectator_topology.n_atoms
self._complex_topology_old = self._complex_md_topology_old.to_openmm()
self._complex_topology_new = self._complex_md_topology_new.to_openmm()

n_atoms_total_old = self._complex_topology_old.getNumAtoms()
n_atoms_total_new = self._complex_topology_new.getNumAtoms()
n_atoms_protein_old = self._receptor_topology_old.getNumAtoms()
n_atoms_protein_new = n_atoms_protein_old # Assumes it's the same target
n_atoms_ligand_old = n_atoms_total_old - n_atoms_protein_old - n_atoms_spectators
n_atoms_ligand_new = n_atoms_total_new - n_atoms_protein_new - n_atoms_spectators

self._complex_positions_old = unit.Quantity(np.zeros([n_atoms_total_old, 3]), unit=unit.nanometers)
self._complex_positions_old[:n_atoms_protein_old, :] = self._receptor_positions_old
self._complex_positions_old[n_atoms_protein_old:n_atoms_protein_old+n_atoms_ligand_old, :] = self._ligand_positions_old
self._complex_positions_new = unit.Quantity(np.zeros([n_atoms_total_new, 3]), unit=unit.nanometers)
self._complex_positions_new[:n_atoms_protein_new, :] = self._receptor_positions_old # Assumes it's the same target
self._complex_positions_new[n_atoms_protein_new:n_atoms_protein_new + n_atoms_ligand_new,
:] = self._ligand_positions_new

if self._spectator_filenames:
start = n_atoms_protein_old+n_atoms_ligand_old
Expand Down Expand Up @@ -687,9 +677,6 @@ def _generate_solvent_topologies(self, topology_proposal, old_positions):
old_solvated_topology, old_solvated_positions, old_solvated_system = self._solvate_system(
old_ligand_topology.to_openmm(), old_ligand_positions, phase='solvent',
box_dimensions=self._solvent_box_dimensions, model=self._solvent_model)
# Update attributes
self._ligand_topology_old_solvated = old_solvated_topology
self._ligand_positions_old_solvated = old_solvated_positions

old_solvated_md_topology = md.Topology.from_openmm(old_solvated_topology)

Expand Down

0 comments on commit 2e7aa04

Please sign in to comment.