Skip to content

Commit

Permalink
add example of id error
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Duane Walker authored and misterbrandonwalker committed Nov 8, 2024
1 parent cbdfdb6 commit f89ceb2
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
rename_residues_mol, combine_structure,
remove_terminal_residue_name_prefixes, molgan,
pdbbind_refined, onionnet-sfct, smina, pdbfixer,
fix_pdb_atom_column, extract_protein, extract_ligand_protein, generate_conformers] # No username for pdbind_refined
fix_pdb_atom_column, extract_protein, generate_conformers] # No username for pdbind_refined
# skip data/ and cwl_adapters/file_format_conversions/biosimspace/
runs-on: [ubuntu-latest]

Expand Down
85 changes: 0 additions & 85 deletions cwl_adapters/extract_ligand_protein.cwl

This file was deleted.

4 changes: 4 additions & 0 deletions cwl_adapters/topology_check.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ outputs:
loadContents: true
outputEval: |
${
// check if self[0] exists
if (!self[0]) {
return null;
}
// Read the contents of the file
const lines = self[0].contents.split("\n");
// Read boolean value from the first line
Expand Down
1 change: 0 additions & 1 deletion docker/dockerBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ sudo docker build --no-cache --pull -f Dockerfile_onionnet-sfct -t polusai/onion
sudo docker build --no-cache --pull -f Dockerfile_smina -t cyangnyu/smina .
sudo docker build --no-cache --pull -f Dockerfile_pdbfixer -t ndonyapour/pdbfixer .
sudo docker build --no-cache --pull -f Dockerfile_extract_protein -t ndonyapour/extract_protein .
sudo docker build --no-cache --pull -f Dockerfile_extract_ligand_protein -t mrbrandonwalker/extract_ligand_protein .
sudo docker build --no-cache --pull -f Dockerfile_fix_pdb_atom_column -t ndonyapour/fix_pdb_atom_column .
sudo docker build --no-cache --pull -f Dockerfile_generate_conformers -t ndonyapour/generate_conformers .

Expand Down
1 change: 0 additions & 1 deletion dockerPull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ docker pull mrbrandonwalker/diffdock_gpu
docker pull mrbrandonwalker/diffdock_cpu
docker pull ndonyapour/pdbfixer
docker pull ndonyapour/extract_protein
docker pull mrbrandonwalker/extract_ligand_protein
docker pull ndonyapour/fix_pdb_atom_column
docker pull ndonyapour/generate_conformers
7 changes: 0 additions & 7 deletions examples/scripts/Dockerfile_extract_ligand_protein

This file was deleted.

4 changes: 1 addition & 3 deletions examples/scripts/calculate_net_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ def get_net_charge(file_path: str, addhydrogens: bool = False) -> Optional[int]:
if addhydrogens:
mol = Chem.AddHs(mol)
try:
AllChem.ComputeGasteigerCharges(mol,
nIter=50,
throwOnParamFailure=True)
AllChem.ComputeGasteigerCharges(mol, nIter=50, throwOnParamFailure=True) # type: ignore
except Exception: # pylint: disable=broad-exception-caught
return None

Expand Down
111 changes: 0 additions & 111 deletions examples/scripts/extract_ligand_protein.py

This file was deleted.

6 changes: 3 additions & 3 deletions examples/scripts/generate_conformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ def load_data(input_excel_path: str, query: str, smiles_column: str, binding_dat

# See https://www.rdkit.org/docs/GettingStartedInPython.html#working-with-3d-molecules
mol_2D: rdkit.Chem.rdchem.Mol = Chem.MolFromSmiles(smiles) # pylint: disable=c-extension-no-member,no-member
AllChem.Compute2DCoords(mol_2D) # pylint: disable=no-member
AllChem.Compute2DCoords(mol_2D) # type: ignore # pylint: disable=no-member

# See https://www.rdkit.org/docs/source/rdkit.Chem.rdmolops.html#rdkit.Chem.rdmolops.AddHs
# NOTE: "Much of the code assumes that Hs are not included in the molecular topology,
# so be very careful with the molecule that comes back from this function."
mol_3D = Chem.AddHs(mol_2D) # pylint: disable=no-member
AllChem.EmbedMolecule(mol_3D) # pylint: disable=no-member
AllChem.MMFFOptimizeMolecule(mol_3D) # pylint: disable=no-member
AllChem.EmbedMolecule(mol_3D) # type: ignore # pylint: disable=no-member
AllChem.MMFFOptimizeMolecule(mol_3D) # type: ignore # pylint: disable=no-member

filename = f'ligand_{idx}.sdf' # chemblid is NOT unique!
writer = Chem.SDWriter(filename) # pylint: disable=no-member
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/topology_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def get_properties(atom: Atom) -> dict:
res_dict = {}
res = atom.GetPDBResidueInfo()
res_dict['GetResidueName'] = res.GetResidueName()
res_dict['GetResidueNumber'] = res.GetResidueNumber()
res_dict['GetResidueNumber'] = str(res.GetResidueNumber())
res_dict['GetChainId'] = res.GetChainId()
res_dict['GetName'] = res.GetName()
prop_dict = {
Expand Down

0 comments on commit f89ceb2

Please sign in to comment.