File size: 6,574 Bytes
35aaa09 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
#!/usr/bin/env python3
"""
Docking@Hβ β �𧬠AutoDock Suite 4.2.6 Integration β
β π CUDA/CUDPP GPU Acceleration β
β π BOINC Distributed Computing β
β π Decentralized Internet SDK β
β π€ Cloud Agents AI Orchestration βoDock Suite 4.2.6 Integration β
β π CUDA/CUDPP GPU Acceleration β
β π BOINC Distributed Computing β
β π Decentralized Internet SDK β
β π€ Cloud Agents AI Orchestration β Complete Launch Script
This script starts the full Docking@HOME platform including:
- AutoDock GPU integration
- Web-based GUI
- Real-time job monitoring
- Distributed computing support
Authors: OpenPeer AI, Riemann Computing Inc., Bleunomics, Andrew Magdy Kamal
"""
import sys
import asyncio
import argparse
from pathlib import Path
# Add parent directory to path
sys.path.insert(0, str(Path(__file__).parent))
from docking_at_home.gui import start_gui
def print_banner():
"""Print startup banner"""
banner = """
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Docking@HOME v1.0 β
β β
β Distributed Molecular Docking with GPU Acceleration β
β β
β Authors: OpenPeer AI β
β Riemann Computing Inc. β
β Bleunomics β
β Andrew Magdy Kamal β
β β
β 𧬠AutoDock Suite 4.2.6 Integration β
β π CUDA/CUDPP GPU Acceleration β
β π BOINC Distributed Computing β
β π The Decentralized Internet SDK β
β π€ Cloud Agents AI Orchestration β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
"""
print(banner)
def main():
"""Main entry point"""
parser = argparse.ArgumentParser(
description="Docking@HOME - Distributed Molecular Docking Platform",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
# Start GUI server (default)
python start.py
# Start on custom host/port
python start.py --host 0.0.0.0 --port 8888
# Show help
python start.py --help
Support:
π§ Email: [email protected]
π€ Issues: https://huggingface.co/OpenPeerAI/DockingAtHOME/discussions
π Docs: https://huggingface.co/OpenPeerAI/DockingAtHOME
"""
)
parser.add_argument(
'--host',
default='localhost',
help='Host to bind the server to (default: localhost)'
)
parser.add_argument(
'--port',
type=int,
default=8080,
help='Port to bind the server to (default: 8080)'
)
parser.add_argument(
'--workers',
type=int,
default=2,
help='Number of concurrent worker tasks (default: 2)'
)
parser.add_argument(
'--debug',
action='store_true',
help='Enable debug mode'
)
parser.add_argument(
'--no-browser',
action='store_true',
help="Don't automatically open browser"
)
args = parser.parse_args()
# Print banner
print_banner()
# Check dependencies
try:
import fastapi
import uvicorn
import websockets
except ImportError as e:
print("β Missing required dependencies!")
print("\nPlease install:")
print(" pip install -r requirements.txt")
print("\nOr install manually:")
print(" pip install fastapi uvicorn[standard] websockets python-multipart")
sys.exit(1)
# Check AutoDock
import shutil
autodock_found = False
for exe in ['autodock_gpu', 'autodock4', 'autodock']:
if shutil.which(exe):
print(f"β
Found AutoDock: {exe}")
autodock_found = True
break
if not autodock_found:
print("β οΈ AutoDock not found in PATH")
print(" Running in simulation mode")
print(" To use real AutoDock, install from:")
print(" https://autodock.scripps.edu/")
# Check CUDA
if shutil.which('nvidia-smi'):
print("β
CUDA GPU detected")
else:
print("β οΈ CUDA not detected - CPU mode only")
print("\n" + "="*70)
print(f"π Starting server on http://{args.host}:{args.port}")
print("="*70 + "\n")
# Open browser
if not args.no_browser:
import webbrowser
import threading
def open_browser():
import time
time.sleep(1.5) # Wait for server to start
webbrowser.open(f"http://{args.host}:{args.port}")
threading.Thread(target=open_browser, daemon=True).start()
# Start GUI server
try:
start_gui(host=args.host, port=args.port)
except KeyboardInterrupt:
print("\n\nπ Server stopped. Thank you for using Docking@HOME!")
except Exception as e:
print(f"\nβ Error: {e}")
if args.debug:
raise
sys.exit(1)
if __name__ == "__main__":
main()
|