ManasSharma07 commited on
Commit
5b6877c
·
verified ·
1 Parent(s): fb617c3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +205 -8
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
- title: MLIP Playground
3
- emoji: 🚀
4
  colorFrom: red
5
  colorTo: red
6
  sdk: docker
@@ -8,15 +8,212 @@ app_port: 8501
8
  tags:
9
  - streamlit
10
  pinned: true
11
- short_description: Run, test and compare >17 state-of-the-art universal MLIIPs
12
  license: mit
13
  thumbnail: >-
14
- https://cdn-uploads.huggingface.co/production/uploads/639e2fd4f87da5e2eb198210/mdRlmwr2xBNrRVf-uj8Sa.png
15
  ---
16
 
17
- # Welcome to Streamlit!
18
 
19
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
 
 
 
20
 
21
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
22
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: PyFock GUI
3
+ emoji:
4
  colorFrom: red
5
  colorTo: red
6
  sdk: docker
 
8
  tags:
9
  - streamlit
10
  pinned: true
11
+ short_description: A web-based GUI application for running PyFock interactively
12
  license: mit
13
  thumbnail: >-
14
+ https://cdn-uploads.huggingface.co/production/uploads/639e2fd4f87da5e2eb198210/PwAxx1kYEqaiV1Dd0XbAG.png
15
  ---
16
 
17
+ # PyFock GUI - Interactive DFT Calculations in Your Browser
18
 
19
+ [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://pyfock.streamlit.app)
20
+ [![Python](https://img.shields.io/badge/Python-3.8%2B-blue.svg)](https://www.python.org/)
21
+ [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
22
+ [![PyFock](https://img.shields.io/badge/PyFock-Latest-orange.svg)](https://github.com/manassharma07/PyFock)
23
 
24
+ A modern, interactive web interface for [PyFock](https://github.com/manassharma07/PyFock) - a pure Python DFT code with Numba JIT acceleration and performance matching C++ implementations.
25
+
26
+ ![PyFock GUI Banner](https://raw.githubusercontent.com/manassharma07/PyFock/main/logo_crysx_pyfock.png)
27
+
28
+ ## Live Demo
29
+
30
+ Try PyFock GUI instantly without any installation:
31
+
32
+ - Primary: [https://pyfock.streamlit.app](https://pyfock.streamlit.app)
33
+ - Alternative: [https://pyfock-gui.bragitoff.com](https://pyfock-gui.bragitoff.com)
34
+ - HuggingFace: [https://manassharma07-pyfock-gui.hf.space/](https://manassharma07-pyfock-gui.hf.space/)
35
+
36
+ ## Features
37
+
38
+ ### Computational Capabilities
39
+ Pure Python DFT calculations with performance matching C++ codes. Supports multiple XC functionals (LDA, PBE, BLYP, BP86) and flexible basis sets (STO-3G, 6-31G, cc-pVDZ, def2-SVP, def2-TZVP). Includes density fitting for efficiency and optional PySCF comparison for validation.
40
+
41
+ ### Visualization
42
+ Interactive 3D structure viewer with customizable styles. Real-time HOMO/LUMO visualization with adjustable isosurfaces. Electron density maps and exploration of any molecular orbital.
43
+
44
+ ### Input/Output
45
+ 15+ example molecules included (water, benzene, acetone, pyrrole, THF). Custom XYZ input supported. Downloadable cube files for HOMO, LUMO, and density. Python script generation for reproducible calculations with detailed convergence logs.
46
+
47
+ ### Key Advantages
48
+ 100% Pure Python including molecular integrals. Numba JIT acceleration for near-C++ performance. GPU support via CuPy. Near-quadratic scaling (~O(N²·⁰⁵)). High accuracy matching PySCF (<10⁻⁷ Ha). Cross-platform compatibility. Easy pip installation.
49
+
50
+ ## Quick Start
51
+
52
+ ### Option 1: Use Online (Recommended)
53
+ Simply visit any of the live demo URLs above - no installation required.
54
+
55
+ ### Option 2: Run Locally
56
+
57
+ Clone the repository:
58
+ ```bash
59
+ git clone https://github.com/manassharma07/pyfock-gui.git
60
+ cd pyfock-gui
61
+ ```
62
+
63
+ Install dependencies:
64
+ ```bash
65
+ # Install LibXC (required by PyFock)
66
+ # For Python < 3.10:
67
+ sudo apt-get install libxc-dev # Ubuntu/Debian
68
+ pip install pylibxc2
69
+
70
+ # For Python >= 3.10 (recommended):
71
+ conda install -c conda-forge pylibxc -y
72
+
73
+ # Install PyFock and dependencies
74
+ pip install pyfock streamlit py3Dmol pyscf ase pandas
75
+
76
+ # Optional: GPU support
77
+ pip install cupy-cuda12x # adjust for your CUDA version
78
+ ```
79
+
80
+ Run the app:
81
+ ```bash
82
+ streamlit run app.py
83
+ ```
84
+
85
+ The app will open in your browser at `http://localhost:8501`
86
+
87
+ ## Usage Guide
88
+
89
+ ### Basic Workflow
90
+
91
+ Select a molecule from 15+ examples or paste your own XYZ coordinates. Configure calculation parameters: basis set, XC functional, convergence criteria, and optionally enable PySCF comparison. Adjust visualization settings including cube file resolution, isovalue, and opacity. Run the calculation and monitor progress through status updates. Explore results including energy components, HOMO-LUMO gap, orbital energies, and interactive 3D visualizations. Download cube files and generated Python scripts.
92
+
93
+ ### Example Calculation
94
+
95
+ ```python
96
+ # The GUI generates ready-to-run Python scripts
97
+ # Example for water molecule with PBE/sto-3g
98
+
99
+ from pyfock import Basis, Mol, DFT, Utils
100
+
101
+ # Initialize molecule
102
+ mol = Mol(coordfile='water.xyz')
103
+ basis = Basis(mol, {'all': Basis.load(mol=mol, basis_name='sto-3g')})
104
+ auxbasis = Basis(mol, {'all': Basis.load(mol=mol, basis_name='def2-universal-jfit')})
105
+
106
+ # Run DFT
107
+ dftObj = DFT(mol, basis, auxbasis, xc=[101, 130]) # PBE
108
+ energy, dmat = dftObj.scf()
109
+
110
+ # Generate cube files
111
+ Utils.write_orbital_cube(mol, basis, dftObj.mo_coefficients[:, homo_idx], 'HOMO.cube')
112
+ ```
113
+
114
+ ## Important Notes
115
+
116
+ ### JIT Compilation
117
+ PyFock uses Numba JIT compilation for acceleration. The **first calculation will be slower** as functions are compiled. **Subsequent runs will be significantly faster** - this is expected behavior and a key advantage of JIT compilation.
118
+
119
+ ### System Limits
120
+ Cloud version is limited to ~120 basis functions due to computational constraints. Local version can handle much larger systems (~10,000 basis functions). For large molecules, use smaller basis sets (sto-3g) or run locally.
121
+
122
+ ### Recommended Settings
123
+ Quick tests: sto-3g basis with small molecules (water, benzene). Production runs: 6-31G or def2-SVP basis. High accuracy: cc-pVDZ or def2-TZVP basis (use locally for large systems).
124
+
125
+ ## Example Molecules
126
+
127
+ The GUI includes 15+ pre-configured molecules:
128
+
129
+ | Molecule | Atoms | Description |
130
+ |----------|-------|-------------|
131
+ | Water | 3 | Quick test system |
132
+ | Benzene | 12 | Aromatic ring |
133
+ | Acetone | 10 | Carbonyl group |
134
+ | Pyrrole | 10 | Heterocycle |
135
+ | THF | 13 | Cyclic ether |
136
+ | CO₂ | 3 | Linear molecule |
137
+ | H₂O₂ | 4 | Peroxide linkage |
138
+
139
+ ## Performance Highlights
140
+
141
+ ### CPU Performance
142
+ Up to 2× faster than PySCF with strong scaling up to 32 cores. Near-quadratic scaling (~O(N²·⁰⁵)) with basis functions.
143
+
144
+ ### GPU Acceleration
145
+ Up to 14× speedup vs 4-core CPU. Single A100 GPU handles 4000+ basis functions. Consumer GPUs (RTX series) supported.
146
+
147
+ ## Technical Details
148
+
149
+ ### Supported Methods
150
+ Kohn-Sham density functional theory with density fitting (resolution of identity approximation) and DIIS-accelerated SCF convergence.
151
+
152
+ ### XC Functionals
153
+ LDA: SVWN5 (Slater + VWN5 correlation)
154
+ GGA: PBE, BLYP, BP86
155
+
156
+ ### Basis Sets
157
+ STO-3G, STO-6G, 3-21G, 4-31G, 6-31G, 6-31+G, 6-31++G, cc-pVDZ, def2-SVP, def2-TZVP
158
+
159
+ ## Technology Stack
160
+
161
+ Backend powered by [PyFock](https://github.com/manassharma07/PyFock) for pure Python DFT calculations. Frontend built with [Streamlit](https://streamlit.io/). Visualization using [py3Dmol](https://3dmol.csb.pitt.edu/). Optional comparison with [PySCF](https://pyscf.org/). Structure handling via [ASE](https://wiki.fysik.dtu.dk/ase/).
162
+
163
+ ## Documentation
164
+
165
+ PyFock Documentation: [https://pyfock-docs.bragitoff.com](https://pyfock-docs.bragitoff.com)
166
+ PyFock GitHub: [https://github.com/manassharma07/PyFock](https://github.com/manassharma07/PyFock)
167
+ PyPI Package: [https://pypi.org/project/pyfock/](https://pypi.org/project/pyfock/)
168
+
169
+ ## Contributing
170
+
171
+ Contributions are welcome. Please submit a Pull Request or open an issue to discuss major changes.
172
+
173
+ ## Citation
174
+
175
+ If you use PyFock or PyFock GUI in your research, please cite:
176
+
177
+ ```bibtex
178
+ @software{pyfock2024,
179
+ author = {Sharma, Manas},
180
+ title = {PyFock: Pure Python DFT with Numba Acceleration},
181
+ year = {2024},
182
+ url = {https://github.com/manassharma07/PyFock}
183
+ }
184
+ ```
185
+
186
+ Paper coming soon on arXiv.
187
+
188
+ ## Author
189
+
190
+ **Manas Sharma**
191
+ Website: [bragitoff.com](https://bragitoff.com)
192
+ LinkedIn: [manassharma07](https://www.linkedin.com/in/manassharma07)
193
+ Contact: Via GitHub issues
194
+
195
+ ## Support
196
+
197
+ If you find this project useful:
198
+ - Star the [PyFock](https://github.com/manassharma07/PyFock) repository
199
+ - Star this [PyFock GUI](https://github.com/manassharma07/pyfock-gui) repository
200
+ - Share with colleagues and students
201
+ - Report bugs and request features
202
+
203
+ ## License
204
+
205
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
206
+
207
+ ## Acknowledgments
208
+
209
+ Thanks to the PyFock development team, Streamlit community, PySCF developers, and all contributors and users.
210
+
211
+ ---
212
+
213
+
214
+
215
+ **Made with care by PhysWhiz**
216
+
217
+ *Pure Python • Numba JIT • GPU Ready*
218
+
219
+ [Try Now](https://pyfock.streamlit.app) | [Documentation](https://pyfock-docs.bragitoff.com) | [Issues](https://github.com/manassharma07/pyfock-gui/issues)