Skip to content

Commit

Permalink
Co-authored-by: Quinny Campbell <qcampbel@users.noreply.github.com>
Browse files Browse the repository at this point in the history
  • Loading branch information
brittyscience committed Jun 24, 2024
2 parents 7ebb3a4 + 9beeb0f commit 7de6997
Show file tree
Hide file tree
Showing 6 changed files with 1,914 additions and 3 deletions.
1 change: 0 additions & 1 deletion mdagent/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def __init__(
model="gpt-4-1106-preview", # current name for gpt-4 turbo
tools_model="gpt-4-1106-preview",
temp=0.1,
max_iterations=40,
verbose=True,
ckpt_dir="ckpt",
top_k_tools=20, # set "all" if you want to use all tools
Expand Down
40 changes: 39 additions & 1 deletion mdagent/tools/base_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@
from .preprocess_tools.clean_tools import CleaningToolFunction
from .preprocess_tools.packing import PackMolTool
from .preprocess_tools.pdb_get import ProteinName2PDBTool, SmallMolPDB, get_pdb
from .preprocess_tools.uniprot import (
GetActiveSites,
GetAllKnownSites,
GetAllSequences,
GetBindingSites,
GetGeneNames,
GetInteractions,
GetKineticProperties,
GetPDB3DInfo,
GetPDBProcessingInfo,
GetProteinAssociatedKeywords,
GetProteinFunction,
GetRelevantSites,
GetSequenceInfo,
GetSubunitStructure,
GetTurnsBetaSheetsHelices,
GetUniprotID,
MapProteinRepresentation,
UniprotID2Name,
)
from .simulation_tools.create_simulation import ModifyBaseSimulationScriptTool
from .simulation_tools.setup_and_run import (
SetUpandRunFunction,
Expand All @@ -39,6 +59,22 @@

__all__ = [
"CleaningToolFunction",
"GetActiveSites",
"GetAllKnownSites",
"GetAllSequences",
"GetBindingSites",
"GetGeneNames",
"GetInteractions",
"GetKineticProperties",
"GetPDB3DInfo",
"GetPDBProcessingInfo",
"GetProteinAssociatedKeywords",
"GetProteinFunction",
"GetRelevantSites",
"GetSequenceInfo",
"GetSubunitStructure",
"GetTurnsBetaSheetsHelices",
"GetUniprotID",
"ComputeAngles",
"ComputeChi1",
"ComputeChi2",
Expand All @@ -58,6 +94,7 @@
"DistanceMatrixTool",
"ListRegistryPaths",
"MapPath2Name",
"MapProteinRepresentation",
"ModifyBaseSimulationScriptTool",
"MomentOfInertia",
"PackMolTool",
Expand All @@ -72,11 +109,12 @@
"RMSDCalculator",
"Scholar2ResultLLM",
"SerpGitTool",
"SetUpandRunFunction",
"SetUpAndRunTool",
"SetUpandRunFunction",
"SimulationFunctions",
"SimulationOutputFigures",
"SmallMolPDB",
"UniprotID2Name",
"SolventAccessibleSurfaceArea",
"VisFunctions",
"VisualizeProtein",
Expand Down
3 changes: 2 additions & 1 deletion mdagent/tools/base_tools/preprocess_tools/pdb_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def get_pdb(query_string: str, path_registry: PathRegistry):
else:
filetype = "pdb"
if "result_set" in r.json() and len(r.json()["result_set"]) > 0:
pdbid = r.json()["result_set"][0]["identifier"]
results = r.json()["result_set"]
pdbid = max(results, key=lambda x: x["score"])["identifier"]
print(f"PDB file found with this ID: {pdbid}")
st.markdown(f"PDB file found with this ID: {pdbid}", unsafe_allow_html=True)
url = f"https://files.rcsb.org/download/{pdbid}.{filetype}"
Expand Down
Loading

0 comments on commit 7de6997

Please sign in to comment.