### FireCore Semiclassical Electron Dynamics Example Source: https://github.com/prokophapala/firecore/wiki/eFF C++ source code for a graphical example program demonstrating semiclassical electron dynamics simulations using FireCore. ```C++ #include "../sketches_SDL/Molecular/test_eFF_MD.cpp" ``` -------------------------------- ### FireCore Relaxation Example Source: https://github.com/prokophapala/firecore/wiki/eFF C++ source code for a graphical example program demonstrating molecular relaxation using FireCore. ```C++ #include "../sketches_SDL/Molecular/test_eFF.cpp" ``` -------------------------------- ### FireCore Electron Forcefield Implementation Source: https://github.com/prokophapala/firecore/wiki/eFF Source code for the actual electron forcefield implementation within the FireCore project. ```C++ #include "../common/molecular/eFF.h" ``` -------------------------------- ### Relax Molecular Geometry with Python API Source: https://github.com/prokophapala/firecore/wiki/eFF Demonstrates how to use the Python API to load a molecule, initialize an optimizer, run a relaxation simulation until convergence, and save the relaxed geometry. ```Python eff.load_fgo("initial_geometry.fgo" ) eff.initOpt(dt=0.03,damping=0.1 ) eff.run( 10000, Fconv=1e-3, ialg=2 ) eff.save_fgo(name+"_relaxed.fgo" ) ``` -------------------------------- ### Run Electron Dynamics Simulation with Python API Source: https://github.com/prokophapala/firecore/wiki/eFF Shows how to use the Python API to load a molecule with initial velocities, set up electron properties, configure trajectory saving, and run an electron dynamics simulation using a leap-frog integrator. ```Python eff.load_fgo("data/H2O_shoot.fgo", bVel_=True ) eff.initOpt(dt=0.001,damping=0.0, bMass=True) eff.invSmass[:] = 0 eff.setTrjName("trj_bullet_vs_H2O.xyz") eff.run( 1000, ialg=-1 ) ``` -------------------------------- ### Run Python Simulation Script Source: https://github.com/prokophapala/firecore/wiki/eFF This script automatically recompiles the C++ library and then executes a Python script to simulate the impact of a free-flying electron on a water molecule. ```Shell tests/tEFF/run.sh ``` -------------------------------- ### Compile and Run FireCore C++ GUI Source: https://github.com/prokophapala/firecore/wiki/eFF Instructions to compile the C++ subfolder of FireCore with SDL support and run the graphical molecular simulation. The simulation visualizes a molecule hit by an electron, displaying energy and force components in real-time. ```bash cd FireCore/cpp/ make -DWITH_SDL=ON ./Build/sketches_SDL/Molecular/test_eFF_MD ``` -------------------------------- ### Compile C++ Library Source: https://github.com/prokophapala/firecore/wiki/eFF Instructions for compiling the C++ library libeFF_lib.so using CMake. It highlights that OpenCL, OpenGL, and SDL are optional dependencies and can be disabled during the build process. ```Shell cmake .. -DWITH_SDL=OFF -DWITH_OPENCL=OFF ``` -------------------------------- ### CMake Minimum Required Version and Project Setup Source: https://github.com/prokophapala/firecore/blob/master/cpp/CMakeLists.txt Sets the minimum required CMake version and defines the project name. This is a standard starting point for any CMakeLists.txt file. ```cmake cmake_minimum_required ( VERSION 2.8 ) cmake_minimum_required(VERSION 3.10) project ( SimpleSimulationEngine ) ``` -------------------------------- ### FireCore Python API Wrapper Source: https://github.com/prokophapala/firecore/wiki/eFF Python script that acts as a wrapper for the libeFF_lib.so dynamic library, providing a Python interface to FireCore's functionalities. ```Python from pyBall import eFF ``` -------------------------------- ### FireCore .fgo Format: Hydrogen Atom Example Source: https://github.com/prokophapala/firecore/wiki/eFF Provides an example of a .fgo file representing a single hydrogen atom with one electron in a spin-up state. This illustrates the basic format for a simple atomic system. ```text 1 1 1 0 +0.0 0.0 0.0 -1. 0.0 0.0 0.0 +0.0 0.0 0.0 0.5 1.0 +1 ``` -------------------------------- ### Install and Run Docling for PDF to Text Conversion Source: https://github.com/prokophapala/firecore/wiki/AI-coding This snippet demonstrates how to install the Docling library, which is used to make documents AI-ready by converting them to text. It also shows how to run the Docling pipeline for PDF processing, including options for formula enrichment and image export. ```Shell pip install "docling[vlm]" # pulls the Nougat weights ``` ```Shell docling --pipeline vlm --enrich-formula --to md --image-export-mode referenced Vivace_paralel_triangular_matrix_GPU_nvr-2011-001.pdf ``` -------------------------------- ### Python API: Initialize and Load Molecule Source: https://github.com/prokophapala/firecore/wiki/eFF Illustrates the basic initialization of the eFF library in Python, either by allocating arrays with `eff.init()` or by loading molecular data from a .fgo file using `eff.load_fgo()`. ```Python from pyBall import eFF as eff eff.init(natoms,nelectrons) # or eff.load_fgo("molecule.fgo") ``` -------------------------------- ### FireCore Dynamic Library (libeFF_lib.so) Source: https://github.com/prokophapala/firecore/wiki/eFF Source code for the dynamic library libeFF_lib.so, which exposes the functionality of eFF.h as pure C functions. ```C++ #include "../libs/Molecular/eFF_lib.cpp" ``` -------------------------------- ### Simulation Initialization and Setup Methods Source: https://github.com/prokophapala/firecore/blob/master/doc/Markdown/cpp/common/molecular/MolWorld_sp3.h.md Methods for initializing and setting up the molecular simulation environment. This includes initializing the world, preparing for the simulation loop, loading molecular structures, and setting up force fields and optimizers. ```C++ void init(); void pre_loop(); void initParams(); void insertSMILES(); void buildMolecule_xyz(); void makeMoleculeTopology(); void assingMoleculeTopoTypes(); void loadGeom(); void makeMMFFs(); void makeFFs(); void setOptimizer(); void initRigid(); void initWithSMILES(); void clear(); ``` -------------------------------- ### File System Navigation in Julia Source: https://github.com/prokophapala/firecore/wiki/Julia:-Use-troubleshoot Provides basic file system navigation commands in Julia. These functions allow users to get information about files, determine the current working directory, and change directories. ```Julia readdir() ``` ```Julia pwd() ``` ```Julia cd('') ``` -------------------------------- ### C++ Task Setup for Double Buffering Source: https://github.com/prokophapala/firecore/wiki/OpenCL-performance-tips This C++ snippet shows how to set up tasks for updating positions using a double buffering strategy. It prepares two tasks, each using a different buffer pair, to be enqueued sequentially in a loop. ```C++ task1 = setup_update( pos1, pos2, neighs ); task2 = setup_update( pos2, pos1, neighs ); for(int itr=0; itr ) target_link_libraries( test_BondAdaptedMesh ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} ) ``` -------------------------------- ### CMake: Setup Precompiled Headers Source: https://github.com/prokophapala/firecore/blob/master/cpp/CMakeLists.txt A CMake function to set up precompiled headers for a target. It takes a target name and a list of additional header files as arguments, compiling them for faster build times. ```cmake function(setup_precompiled_headers target) set(additional_headers ${ARGN}) # ARGN holds all additional arguments passed to the function set(all_headers "${COMMON_SRCS}/testUtils.h" "${COMMON_SRCS}/macroUtils.h" "${COMMON_SRCS}/IO_utils.h" "${COMMON_SRCS}/math/fastmath.h" "${COMMON_SRCS}/math/Vec2.h" "${COMMON_SRCS}/math/Vec3.h" "${COMMON_SRCS}/math/quaternion.h" "${COMMON_SRCS}/math/Mat3.h" ${additional_headers} # This now directly uses the list of additional headers ) target_precompile_headers(${target} PRIVATE ${all_headers}) endfunction() ``` -------------------------------- ### Run MolGUIapp_multi with PTCDA on NaCl (GPU) Source: https://github.com/prokophapala/firecore/wiki/Runnning-calculations Example command to run the GPU-accelerated MolGUIapp_multi program with 50 replicas of PTCDA molecules on an NaCl substrate. This demonstrates parallel processing capabilities. ```Shell #./MolGUIapp_multi -m 50 -x common_resources/PTCDA_SAM -g common_resources/NaCl_1x1_L2 ``` -------------------------------- ### Open GUI Source: https://github.com/prokophapala/firecore/blob/master/tests/tGridFF/README.md Launches the graphical user interface for the conformational sampling program. This is the primary entry point for interacting with the tool. ```bash python3 throughput_gui.py ``` -------------------------------- ### Aider: Cheap Model Options Source: https://github.com/prokophapala/firecore/wiki/AI-coding Command-line arguments for using Aider with cost-effective AI models available through services like OpenRouter. ```bash aider --model openrouter/qwen/qwen-2.5-coder-32b-instruct ``` ```bash aider --model deepseek/deepseek-coder ``` -------------------------------- ### Build Process for PGO (Instrumentation) Source: https://github.com/prokophapala/firecore/wiki/Profile-Guided-Optimization This bash script outlines the steps to build a project using CMake after modifying the CMakeLists.txt for PGO instrumentation. It includes creating a build directory, navigating into it, and running CMake and make. ```bash mkdir build cd build cmake .. make ``` -------------------------------- ### Configure Jmol Startup Settings Source: https://github.com/prokophapala/firecore/wiki/Other-Useful-Software Sets up default Jmol configurations for measurement units, background color, perspective depth, and labeling. These settings are applied via a Jmol.defaults file. ```Jmol color measure black background white set perspectiveDepth OFF set measurementUnits ANGSTROMS label %a set showAxes TRUE ``` -------------------------------- ### Aider: Free Model Options Source: https://github.com/prokophapala/firecore/wiki/AI-coding Command-line arguments to use Aider with various free AI models. Includes options for specifying models and mapping tokens for context. ```bash aider --model github/gpt-4o ``` ```bash aider --model gemini/gemini-1.5-pro-002 --map-tokens 2048 ``` ```bash aider --model gemini/gemini-1.5-flash-002 --map-tokens 2048 ``` ```bash aider --model mistral/mistral-large-latest --map-tokens 2048 ``` ```bash aider --model codestral/codestral-latest --map-tokens 2048 ``` ```bash aider --model cerebras/llama3.1-70b ``` -------------------------------- ### Python API: Access and Modify Internal Buffers Source: https://github.com/prokophapala/firecore/wiki/eFF Demonstrates how to access and modify the internal C data arrays of the eFF library by wrapping them as NumPy arrays using `eff.eff.getBuffs()`. This allows for direct manipulation of simulation states. ```Python eff.eforce eff.eforce[-1,1]+=50.0 ``` -------------------------------- ### Aider: Architect with Gemini exp-1206 Source: https://github.com/prokophapala/firecore/wiki/AI-coding Demonstrates using Aider with the Gemini exp-1206 model as the architect, optionally specifying an editor model for code editing tasks. Shows basic and configured usage. ```bash aider --model gemini/gemini-exp-1206 ``` ```bash aider --architect --model gemini/gemini-exp-1206 --editor-model github/gpt-4o-mini ``` ```bash aider --architect --model gemini/gemini-exp-1206 --editor-model openrouter/qwen/qwen-2.5-coder-32b-instruct ``` -------------------------------- ### Create .desktop file for AppImage Source: https://github.com/prokophapala/firecore/wiki/LinuxTips This snippet shows the content of a .desktop file used to register an AppImage with the 'Open With' menu. It specifies the application's name, comment, icon, and crucially, the Exec line which includes the path to the AppImage and the '%f' argument to handle file opening. ```INI [Desktop Entry] Type=Application Name=Inkscape GenericName=Inkscape Comment=Open-source software prototyping platform Exec=/home/prokop/SW/Inkscape-091e20e-x86_64.AppImage %f Icon=processing-pde Terminal=false Categories=Graphics;IDE;Programming; MimeType=text/x-processing; Keywords=graphics;vector; StartupWMClass=processing-app-ui-Splash ``` -------------------------------- ### FireCore .fgo Format: Water Molecule (No Frozen Core) Source: https://github.com/prokophapala/firecore/wiki/eFF Presents the .fgo file format for a water molecule without the frozen core approximation. This version explicitly includes all electrons, requiring a smaller time-step for accurate simulation due to the rapid oscillations of inner-shell electrons. ```text 3 10 1 0 0.0 0.0 0.0 -8. 0.0 0.0 0.0 +1.0 0.0 1.0 -1. 0.0 0.0 0.0 -1.0 0.0 1.0 -1. 0.0 0.0 0.0 +1.0 0.0 0.5 0.5 1.0 +1 +1.0 0.0 0.5 0.5 1.0 -1 -1.0 0.0 0.5 0.5 1.0 +1 -1.0 0.0 0.5 0.5 1.0 -1 0.0 +1.0 -0.5 0.5 1.0 +1 0.0 +1.0 -0.5 0.5 1.0 -1 0.0 -1.0 -0.5 0.5 1.0 +1 0.0 -1.0 -0.5 0.5 1.0 -1 0.0 0.0 0.0 0.2 1.0 +1 0.0 0.0 0.0 0.2 1.0 -1 ``` -------------------------------- ### FireCore .fgo Format: Water Molecule (Frozen Core) Source: https://github.com/prokophapala/firecore/wiki/eFF Demonstrates the .fgo file format for a water molecule using the frozen core approximation. This configuration simplifies the simulation by treating core electrons as part of the atomic potential, leading to improved numerical stability and speed. ```text 3 8 1 0 0.0 0.0 0.0 -8. 0.0 0.2 1.0 +1.0 0.0 1.0 -1. 0.0 0.0 0.0 -1.0 0.0 1.0 -1. 0.0 0.0 0.0 +1.0 0.0 0.5 1.0 1.0 +1 +1.0 0.0 0.5 1.0 1.0 -1 -1.0 0.0 0.5 1.0 1.0 +1 -1.0 0.0 0.5 1.0 1.0 -1 0.0 +1.0 -0.5 1.0 1.0 +1 0.0 +1.0 -0.5 1.0 1.0 -1 0.0 -1.0 -0.5 1.0 1.0 +1 0.0 -1.0 -0.5 1.0 1.0 -1 ``` -------------------------------- ### Compile FireCore C/C++ Modules Source: https://github.com/prokophapala/firecore/blob/master/README.md Steps to compile the C/C++ modules of FireCore, including setting up the build directory, configuring with CMake, and building the project. Supports optional SDL and OpenCL acceleration. ```bash mkdir cpp/Build cd cpp/Build cmake .. -DWITH_SDL=ON -DWITH_OPENCL=ON -DWITH_FFTW=ON make ``` -------------------------------- ### FireCore .fgo Format: General Structure Source: https://github.com/prokophapala/firecore/wiki/eFF Defines the general structure for .fgo files, specifying the format for atomic and electronic entries. The first line contains the number of atoms, electrons, and other parameters. Subsequent lines describe individual atoms with their charge, position, and core charge smearing parameters, or electrons with their position, size, and spin. ```text natoms nelectrons 1 0 x y z Q sQ sP cP [vx vy vz] # atom Q=core charge, sQ=core charge smearing radius, sP=core electron radius, cP=Pauli repulsion stregth of core electrons, velocities [vx vy vz] are optional x y z s 1.0 ispin [vx vy vz vs] # electron with position (x,y,z) and size s and spin ispin={+1 or -1}. velocities [vx vy vz vs] are optional ``` -------------------------------- ### AVBD Demo (Python) Source: https://github.com/prokophapala/firecore/wiki/Constrain-Solvers This repository provides a demonstration of Augmented Vertex Block Descent (AVBD) in a 2D environment. It likely contains code for setting up and running AVBD simulations. ```Python https://github.com/savant117/avbd-demo2d ``` -------------------------------- ### Install Cppcheck Source: https://github.com/prokophapala/firecore/wiki/Debugging-Tools Install the Cppcheck static analysis tool on Debian-based systems using apt-get. ```Shell sudo apt-get install cppcheck ``` -------------------------------- ### Aider: Architect with GPT-4o Source: https://github.com/prokophapala/firecore/wiki/AI-coding Sets up Aider with GPT-4o as the architect model, paired with various editor models for diverse coding tasks. Shows how to specify the architect and editor models. ```bash aider --architect --model github/gpt-4o --editor-model github/gpt-4o-mini ``` ```bash aider --architect --model github/gpt-4o --editor-model mistral/mistral-large-latest ``` ```bash aider --architect --model github/gpt-4o --editor-model openrouter/qwen/qwen-2.5-coder-32b-instruct ``` ```bash aider --architect --model github/gpt-4o --editor-model deepseek/deepseek-coder ``` ```bash aider --architect --model github/gpt-4o --editor-model gemini/gemini-1.5-flash-002 ``` ```bash aider --architect --model github/gpt-4o --editor-model cerebras/llama3.1-70b ``` -------------------------------- ### Bump Function Example Source: https://github.com/prokophapala/firecore/wiki/Applied-Math Provides a mathematical example of a bump function, commonly used in analysis as test functions. ```mathematics \Psi(r) = e^{-1/(1 - r^2)} ``` -------------------------------- ### Run polymer-2_new with PBC Source: https://github.com/prokophapala/firecore/wiki/Performance-tests Simulates a polymer system with Periodic Boundary Conditions (PBC). The command uses the MolGUIapp and specifies input files for the polymer and a NaCl substrate. Performance is reported for different non-bonded calculation methods. ```Shell ./MolGUIapp -x common_resources/polymer-2_new -g common_resources/NaCl_1x1_L2 -iParalel 0 -T 100 0.01 -verb 2 -perframe 500 ``` -------------------------------- ### Simplet Bond-Order Potential O(r) Example Source: https://github.com/prokophapala/firecore/wiki/Bond-Order-potentials This snippet provides an example of the O(r) function, representing the bond order as a function of distance, used in the Simplet Bond-Order potential. It includes a table of sample values for a Carbon-Carbon bond. ```text r O(r) ----------- 1.10 4.0 1.20 3.0 1.34 2.0 1.53 1.0 1.8 0.4 2.5 0.05 3.8 0.0 ``` -------------------------------- ### Get Electric Field Profile Along a Line Segment Source: https://github.com/prokophapala/firecore/blob/master/doc/Markdown/cpp/common/molecular/GridFF.h.md Gets the electric field profile along a line segment defined by two points. This is useful for analyzing the electric field distribution in specific regions. ```C++ getEFprofile ``` -------------------------------- ### OpenCL Kernel Enqueuing Another Kernel (Directly) Source: https://github.com/prokophapala/firecore/wiki/OpenCL-performance-tips This OpenCL C example shows how to use the `enqueue_kernel` function to execute another kernel (`my_func_A`) from within `my_func_B`. It demonstrates building `ndrange_t` and passing the kernel call as a lambda. ```OpenCL C kernel void my_func_A(global int *a, global int *b, global int *c){ ... } kernel void my_func_B(global int *a, global int *b, global int *c){ ndrange_t ndrange; // build ndrange information ... // example – enqueue a kernel as a block enqueue_kernel(get_default_queue(), ndrange, ^{my_func_A(a, b, c);}); ... } ``` -------------------------------- ### Add Executable and Link Libraries (test_MatchLattice2D) Source: https://github.com/prokophapala/firecore/blob/master/cpp/sketches_SDL/Molecular/CMakeLists.txt Sets up the 'test_MatchLattice2D' executable, linking it with necessary OpenGL and SDL2 libraries. This allows the test to utilize graphical rendering and event handling. ```cmake add_executable( test_MatchLattice2D test_MatchLattice2D.cpp $ ) target_link_libraries( test_MatchLattice2D ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} ) ``` -------------------------------- ### OpenCL Kernel Enqueuing with Lambda and Block Variable Source: https://github.com/prokophapala/firecore/wiki/OpenCL-performance-tips This OpenCL C example shows two ways to enqueue a kernel using `enqueue_kernel`: directly with a lambda expression and by first assigning the lambda to a block variable. Both methods achieve the same result of executing a kernel from within another. ```OpenCL C kernel void my_func(global int *a, global int *b) { ndrange_t ndrange; // build ndrange information ... // note that a, b and c are variables in scope of the block void (^my_block_A)(void) = ^{ size_t id = get_global_id(0); b[id] += a[id]; }; // enqueue the block variable enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange, my_block_A); // or we could have done the following enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange,^{ size_t id = get_global_id(0); b[id] += a[id]; }; } ``` -------------------------------- ### Run FireCore C/C++ Tests Source: https://github.com/prokophapala/firecore/blob/master/README.md Executes tests for the C/C++ modules of FireCore. Includes running force field simulations with the visual GUI and QMMM dynamics. ```bash /home/prokophapala/git/FireCore/cpp/sketches_SDL/Molecular/test_MMFFsp3 FireCore/tests/tQMMM_diacetylene/run.sh ``` -------------------------------- ### Cholesky Decomposition for Sparse Matrices (Julia Example) Source: https://github.com/prokophapala/firecore/wiki/Constrain-Solvers This snippet demonstrates a simple example of Cholesky decomposition in Julia, highlighting its application to sparse matrices. Cholesky decomposition is an efficient method for solving linear systems, particularly when the matrix is symmetric and positive-definite. Exploiting sparsity is crucial for performance in large-scale simulations. ```Julia using SparseArrays using LinearAlgebra # Example sparse matrix (replace with your actual matrix) S = sparse([1.0 0.0 0.0; 0.0 2.0 0.0; 0.0 0.0 3.0]) # Perform Cholesky decomposition L = cholesky(S) # You can then use L to solve systems like L*L' * x = b ``` -------------------------------- ### Create Checkbox List for Toggling Options (C++) Source: https://github.com/prokophapala/firecore/blob/master/doc/Markdown/GUI.md This snippet demonstrates creating a CheckBoxList for toggling various options. It shows how to add checkboxes and bind them to boolean variables, allowing for easy state management. ```cpp #include "GUI.h" class MyGUI { public: GUI gui; bool showGrid = false; bool showAxis = true; void init() { GUI_stepper ylay(1,2); // Create a CheckBoxList for toggling options CheckBoxList* optionsList = new CheckBoxList(5, ylay.x0, 105); optionsList->caption = "Options"; optionsList->addBox("Show Grid", &showGrid); optionsList->addBox("Show Axis", &showAxis); gui.addPanel(optionsList); } }; ``` -------------------------------- ### Build MolGUIapp_multi Executable Source: https://github.com/prokophapala/firecore/blob/master/cpp/apps_OCL/MolecularEditorOCL/CMakeLists.txt Sets up the MolGUIapp_multi executable, linking it with OpenGL, CLFFT, SDL2, Lua, and FFTW libraries. It incorporates objects from DynamicOpt, SDL2OGL, and ProjectiveDynamics_d targets. ```cmake add_executable( MolGUIapp_multi MolGUIapp_multi.cpp $ $ $ ) target_link_libraries( MolGUIapp_multi ${OPENGL_LIBRARIES} ${CLFFT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} ${LUA_LIBRARIES} ${FFTW_LIBRARIES} ) ``` -------------------------------- ### Shadertoy: SDF Texture Filtering (Take 2) Source: https://github.com/prokophapala/firecore/wiki/Computer-Graphics-Algorithms This Shadertoy example presents a second attempt at filtering Signed Distance Field (SDF) textures. It likely refines or explores alternative methods compared to previous examples for achieving high-quality SDF rendering, possibly focusing on performance or specific visual artifacts. The code is in GLSL. ```GLSL /* SDF texture filtering, take 2 https://www.shadertoy.com/view/4sVyWh */ // Basic SDF function (e.g., sphere) float sdSphere(vec2 p, float r) { return length(p) - r; } void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 uv = fragCoord/iResolution.xy; // Example SDF vec2 p = uv - 0.5; float r = 0.2; float sdf_value = sdSphere(p, r); // Apply a different filtering approach (e.g., anisotropic filtering simulation) // This is a conceptual placeholder for advanced filtering. float filtered_sdf = sdf_value; // Placeholder for actual filtering vec3 col = vec3(0.0); if (filtered_sdf < 0.0) { col = vec3(1.0); } fragColor = vec4(col, 1.0); } ``` -------------------------------- ### Other: Set From Reference and Get Title Source: https://github.com/prokophapala/firecore/blob/master/doc/Markdown/cpp/common/molecular/MolWorld_sp3.h.md Utility functions for setting values from a reference and retrieving the title of the system. ```C++ void setFromRef(); ``` ```C++ void getTitle(); ``` -------------------------------- ### Get Vector of Valence Electrons Source: https://github.com/prokophapala/firecore/blob/master/pyBall/doc/atomicUtils.md Retrieves a vector containing the number of valence electrons for each atom in the system. This information is often used in electronic structure calculations. ```Python def getValenceElectrons(self): pass ``` -------------------------------- ### GUI Class Methods Source: https://github.com/prokophapala/firecore/blob/master/doc/Markdown/GUI.md Provides core functionalities for managing GUI elements, handling events, and rendering panels. Includes methods for adding panels, processing events, drawing the UI, and arranging elements. ```C++ void addPanel(GUIAbstractPanel* panel); void onEvent(int mouseX, int mouseY, const SDL_Event& event); void draw(); void layoutRow(int xmin, int ymin, int xspace=0); void clear(int i0=0); ``` -------------------------------- ### Global Optimization: Process Control Source: https://github.com/prokophapala/firecore/blob/master/doc/Markdown/cpp/common/molecular/MolWorld_sp3.h.md Functions to control the global optimization process, including starting, stopping exploration of new configurations, and running the optimization. ```C++ void runGlobalOptimization(); ``` ```C++ void startExploring(); ``` ```C++ void stopExploring(); ``` -------------------------------- ### Create Dropdown List for View Mode Selection (C++) Source: https://github.com/prokophapala/firecore/blob/master/doc/Markdown/GUI.md This snippet shows how to create a DropDownList to select a view mode. It includes adding items to the list and setting a callback to update a variable based on the selection. ```cpp #include "GUI.h" class MyGUI { public: GUI gui; int viewMode = 0; void init() { GUI_stepper ylay(1,2); // Create a DropDownList for view mode selection DropDownList* viewModeList = new DropDownList("View Mode:", 5, ylay.x0, 105, 3); viewModeList->addItem("Top"); viewModeList->addItem("Front"); viewModeList->addItem("Side"); viewModeList->setCommand([this](GUIAbstractPanel* p) { viewMode = ((DropDownList*)p)->iSelected; printf("View Mode: %i\n", viewMode); }); gui.addPanel(viewModeList); } }; ``` -------------------------------- ### run_test_GridFF_ocl_new.py ModuleNotFoundError Source: https://github.com/prokophapala/firecore/blob/master/tests/tMMFF/tMMFF_Test_Runing_QA.md This Python traceback shows a ModuleNotFoundError for 'gpyfft' during the execution of 'run_test_GridFF_ocl_new.py'. This indicates that the 'gpyfft' library, a dependency for the OpenCL GridFF functionality, is not installed or accessible in the environment. ```Python Traceback (most recent call last): File "/home/indranil/git/FireCore/tests/tMMFF/run_test_GridFF_ocl_new.py", line 43, in gff.test_gridFF_ocl( fname="data/xyz/"+name+".xyz", save_name="double3", job="PLQ" ) File "/home/indranil/git/FireCore/tests/tMMFF/../../pyBall/tests/ocl_GridFF_new.py", line 316, in test_gridFF_ocl Vcoul = clgff.makeCoulombEwald_slab( xyzq, niter=2, bSaveQgrid=True, bCheckVin=True, bCheckPoisson=True ) File "/home/indranil/git/FireCore/tests/tMMFF/../../pyBall/OCL/GridFF.py", line 839, in makeCoulombEwald_slab clu.try_load_clFFT() File "/home/indranil/git/FireCore/tests/tMMFF/../../pyBall/OCL/clUtils.py", line 39, in try_load_clFFT from gpyfft.fft import FFT as FFT_ ModuleNotFoundError: No module named 'gpyfft' ```