### Expanding Core Bead Simulation Source: https://context7.com/weria-pezeshkian/freedts/llms.txt This example demonstrates simulating an internal pressure increase using an expanding core bead. It starts from an equilibrated stomatocyte and uses specific parameters for volume coupling and boundary conditions to simulate the expansion. ```bash cat > input_expCore.dts << 'EOF' Integrator_Type = MC_Simulation Min_Max_Lenghts = 1 3 MinfaceAngle = -0.5 Temperature = 1 0 Set_Steps = 1 5000000 EnergyMethod = FreeDTS1.0_FF Kappa = 10 0 0 Edge_Parameters = 5 0 0 VertexArea = 0 0.7 0 0 TimeSeriesData_Period = 100 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 VolumeCoupling = SecondOrder 0 0.0 0.0 TotalAreaCoupling = HarmonicPotential 1000 0.37 AlexanderMove = MetropolisAlgorithmOpenMP 1 Boundary = EllipsoidalCore 5 1 1 1 NonequilibriumCommands ExpandEllipsoidalCoreWall 100 0.005 VisualizationFormat = VTUFileFormat VTU_F 2000 NonbinaryTrajectory = TSI TrajTSI 2000 Restart_Period = 1000 EOF ``` ```bash $path/DTS -in input_expCore.dts -top G20Stomatocyte_NoPro.tsi ``` -------------------------------- ### Simulate Membrane with Proteins Source: https://context7.com/weria-pezeshkian/freedts/llms.txt This example demonstrates simulating a membrane with curvature-inducing proteins. It involves starting with an equilibrated flat membrane, creating an input file with protein inclusions, and then running the simulation. ```bash $path/CNV -in TrajTSI/dts50.tsi -o flat.q ``` ```bash echo "flat.q 2" > top.top ``` ```bash cat > input.dts << 'EOF' Integrator_Type = MC_Simulation Set_Steps = 1 800000 Temperature = 1 0 Kappa = 10 0 0 VertexArea = 0 0 0 0 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 0.2 Dynamic_Box = IsotropicFrameTensionOpenMP 1 0 XY TotalAreaCoupling = HarmonicPotential 0 0.34 InclusionPoseIntegrator = MetropolisAlgorithmOpenMP 1 1 VisualizationFormat = VTUFileFormat VTU_F 1000 NonbinaryTrajectory = TSI TrajTSI 1000 TimeSeriesData_Period = 100 Restart_Period = 1000 INCLUSION Define 2 Inclusions SRotation Type K KG KP KL C0 C0P C0L 0 Pro1 10 0 0 0 0.6 0 0 0 Pro2 20 0 0 0 -0.4 0 0 GenerateInclusions Selection_Type Random TypeID 1 2 Density 0.1 0.0 Inclusion-Inclusion-Int 1 1 1 0 2 0.0 1 2 1 0 0 0.0 2 2 1 0 0 0.0 EOF ``` ```bash $path/DTS -in input.dts -top top.top -e 800000 ``` -------------------------------- ### Q File Format Example Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-2 Example of a .q file structure, detailing box size, vertex count, vertex coordinates, triangle count, and triangle vertex IDs. This format is an alternative to .tsi for representing triangulated surfaces. ```text 50.0000000000 50.0000000000 50.0000000000 130 0 21.1606233083 25.4394806652 25.5960855271 1 27.0284995400 23.2012757654 21.6715285158 2 26.9921761232 25.5136587223 28.0195776981 3 23.3273229896 26.2315165676 28.0075875808 4 26.2722773116 26.3271061222 28.1420707299 5 22.0396876425 23.6080597437 26.8858740866 . . . 125 21.5556280860 25.5595098219 26.5363425272 126 23.2182025326 26.8060871266 21.5195141902 127 25.3199303865 24.3519379911 20.6752314764 128 28.0093200458 22.6356946990 23.4685318698 129 21.4000741257 26.5841316766 25.2761757772 256 0 11 55 43 1 94 75 14 2 64 3 91 3 59 52 40 . . . 253 33 109 44 254 53 69 47 ``` -------------------------------- ### Example Index File for Vertex Groups Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-1 An example of an index file used to define groups of vertices for constraints like harmonic potentials. ```plaintext Group1 1 24 Group2 3 12 16 33 ``` -------------------------------- ### HMFF Energy Method: Basic Usage Example Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-2 Provides a basic usage example for the HMFF energy method, specifying required parameters. ```FreeDTS Config path.mrc 5.0 0 0.005 24.0 ``` -------------------------------- ### HMFF Energy Method: Full Parameter Specification Example Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-2 Provides a detailed usage example for the HMFF energy method, including all optional parameters. ```FreeDTS Config path.mrc 5.0 0 0.005 24.0 1 0.0 0.4 3 0.999 ``` -------------------------------- ### Q File Mesh Topology Example Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Example of a Q file format, which contains simplified mesh topology without inclusion information. It includes vertex coordinates and face definitions. ```text 50.0000000000 50.0000000000 50.0000000000 130 0 21.1606233083 25.4394806652 25.5960855271 1 27.0284995400 23.2012757654 21.6715285158 ... 256 0 11 55 43 1 94 75 14 ... ``` -------------------------------- ### Initial Simulation Input Parameters Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Configure the simulation by providing parameters in a .dts file. This example sets up an MC simulation with specific steps, temperature, kappa, and vertex area values, along with Metropolis algorithms for vertex position and Alexander moves. ```plaintext Integrator_Type = MC_Simulation Set_Steps = 1 20000 Temperature = 1 0 Kappa = 10 0 0 VertexArea = 0 0 0 0 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 0.2 ;so that the volume/area/GC will be printed in the out VolumeCoupling = SecondOrder 0 0 0.77 GlobalCurvatureCoupling = HarmonicPotential 0 0.3 TotalAreaCoupling = HarmonicPotential 0 0.34 ;output managment VisualizationFormat = VTUFileFormat VTU_F 1000 NonbinaryTrajectory = TSI TrajTSI 1000 TimeSeriesData_Period = 100 Restart_Period = 1000 ``` -------------------------------- ### Copy Input File Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Copies the input file from a previous simulation directory to the current working directory. This is a setup step for simulations involving inclusions. ```bash cp $path2previous/input.dts . ``` -------------------------------- ### Q Format Topology File Example Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-1 Example of a .q (TS) file format, which is a simpler representation of triangulated surface data. It includes box dimensions, vertex count and coordinates, and triangle definitions by vertex indices. ```plaintext 50.0000000000 50.0000000000 50.0000000000 130 0 21.1606233083 25.4394806652 25.5960855271 1 27.0284995400 23.2012757654 21.6715285158 2 26.9921761232 25.5136587223 28.0195776981 3 23.3273229896 26.2315165676 28.0075875808 4 26.2722773116 26.3271061222 28.1420707299 5 22.0396876425 23.6080597437 26.8858740866 . . . 125 21.5556280860 25.5595098219 26.5363425272 126 23.2182025326 26.8060871266 21.5195141902 127 25.3199303865 24.3519379911 20.6752314764 128 28.0093200458 22.6356946990 23.4685318698 129 21.4000741257 26.5841316766 25.2761757772 256 0 11 55 43 1 94 75 14 2 64 3 91 3 59 52 40 . . . 253 33 109 44 254 53 69 47 ``` -------------------------------- ### Define Topology File Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Create a topology file by echoing the surface mesh file name and an associated ID. This is necessary for including the mesh in the simulation setup. ```console echo "tetra.q 2" > top.top ``` -------------------------------- ### HMFF Fitting Example Source: https://context7.com/weria-pezeshkian/freedts/llms.txt This example shows how to fit membrane simulations to experimental EM density maps using HMFF (Helfrich Monte Carlo Flexible Fitting). This requires version 2.1+ of the software. The input file specifies the energy method with the density map and associated parameters. ```bash cat > input_hmff.dts << 'EOF' EnergyMethod = FreeDTS1.0_HMFF map.mrc 10 0.0 1 0 0 0.0 0.4 3 0.999 Integrator_Type = MC_Simulation VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 1 InclusionPoseIntegrator = MetropolisAlgorithm 1 1 VisualizationFormat = VTUFileFormat VTU_F 100 NonbinaryTrajectory = TSI TrajTSI 100 Kappa = 20 0 0 EOF ``` -------------------------------- ### TSI File Format Example Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Example structure of a TSI file, which contains detailed mesh information including version, box dimensions, vertices, triangles, and inclusions. ```text version 1.1 box 50.0000000000 50.0000000000 50.0000000000 vertex 130 0 21.1606233083 25.4394806652 25.5960855271 1 27.0284995400 23.2012757654 21.6715285158 ... triangle 256 0 11 55 43 1 94 75 14 ... inclusion 3 0 1 22 0 1 1 1 5 0 1 2 2 30 0 1 ``` -------------------------------- ### Run FreeDTS Simulation for Membrane Relaxation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Create a topology file and then run the FreeDTS simulation using the specified input file and topology. This process relaxes the membrane neck in a tension-free setup. ```console echo "gen1_PBC.q 2" > top.top: $path/DTS -in input_relaxG1PBC.dts -top top.top ``` -------------------------------- ### TSI Topology File Format Example Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-1 Example of a .tsi file structure, detailing version, box dimensions, vertex count and coordinates, triangle definitions, and inclusion information. This format supports multiple TS files and inclusion data. ```plaintext version 1.1 box 50.0000000000 50.0000000000 50.0000000000 vertex 130 0 21.1606233083 25.4394806652 25.5960855271 1 27.0284995400 23.2012757654 21.6715285158 2 26.9921761232 25.5136587223 28.0195776981 3 23.3273229896 26.2315165676 28.0075875808 4 26.2722773116 26.3271061222 28.1420707299 5 22.0396876425 23.6080597437 26.8858740866 . . . 125 21.5556280860 25.5595098219 26.5363425272 126 23.2182025326 26.8060871266 21.5195141902 127 25.3199303865 24.3519379911 20.6752314764 128 28.0093200458 22.6356946990 23.4685318698 129 21.4000741257 26.5841316766 25.2761757772 triangle 256 0 11 55 43 1 94 75 14 2 64 3 91 3 59 52 40 . . . 253 33 109 44 254 53 69 47 255 85 6 74 inclusion 3 0 1 22 0 1 1 1 5 0 1 2 2 30 0 1 ``` -------------------------------- ### Complete Vesicle Simulation Workflow Source: https://context7.com/weria-pezeshkian/freedts/llms.txt A full workflow for simulating a spherical vesicle, including structure generation, topology setup, input file configuration, and running simulations with parameter adjustments. ```bash # 1. Generate tetrahedron starting structure $path/GEN -box 100 100 100 -type tetrahedron -N 18 -o tetra.q # 2. Create topology file echo "tetra.q 2" > top.top # 3. Create input file (input.dts) cat > input.dts << 'EOF' Integrator_Type = MC_Simulation Set_Steps = 1 20000 Temperature = 1 0 Kappa = 10 0 0 VertexArea = 0 0 0 0 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 0.2 VolumeCoupling = SecondOrder 0 0 0.77 GlobalCurvatureCoupling = HarmonicPotential 0 0.3 TotalAreaCoupling = HarmonicPotential 0 0.34 VisualizationFormat = VTUFileFormat VTU_F 1000 NonbinaryTrajectory = TSI TrajTSI 1000 TimeSeriesData_Period = 100 Restart_Period = 1000 EOF # 4. Run initial simulation $path/DTS -in input.dts -top top.top # 5. Increase kappa and continue simulation sed -i 's/Kappa.*= 10/Kappa = 100/' input.dts $path/DTS -in input.dts -top top.top -restart dts.res -e 40000 ``` -------------------------------- ### Run FreeDTS Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-2 Basic command to start a simulation using the DTS executable. Requires an input file and a topology file. The input file can be empty to use default settings. ```bash $PATH/DTS -in input.dts -top topology.top ``` -------------------------------- ### Simulate High-Genus Stomatocyte Source: https://context7.com/weria-pezeshkian/freedts/llms.txt This example details the simulation of a high-genus membrane structure with multiple necks. It involves generating the initial high-genus structure, creating a relaxation input file, and then running the relaxation simulation. ```bash $path/GEN -box 100 100 100 -type high_gen -g 21 -N 30 -o gen20.q ``` ```bash echo "gen20.q 2" > top.top ``` ```bash cat > input_relaxG20.dts << 'EOF' Integrator_Type = MC_Simulation Min_Max_Lenghts = 1 3 MinfaceAngle = -0.5 Temperature = 1 0 Box_Centering_F = 0 Set_Steps = 1 20000000 EnergyMethod = FreeDTS1.0_FF Kappa = 10 0 0 Edge_Parameters = 5 0 0 VertexArea = 0 0.7 0 0 TimeSeriesData_Period = 100 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 VolumeCoupling = SecondOrder 0 0.0 0.0 AlexanderMove = MetropolisAlgorithmOpenMP 1 VisualizationFormat = VTUFileFormat VTU_F 2000 NonbinaryTrajectory = TSI TrajTSI 2000 Restart_Period = 1000 EOF ``` ```bash $path/DTS -in input_relaxG20.dts -top top.top ``` -------------------------------- ### Framed Membrane Simulation with Tension Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Example for simulating a periodic flat membrane under frame tension. This involves generating the initial structure, setting up the topology, and configuring the input file with dynamic box settings. ```bash # 1. Generate flat membrane $path/GEN -box 30 30 100 -type flat -o flat.q echo "flat.q 2" > top.top # 2. Create input file for tensionless membrane cat > input.dts << 'EOF' Integrator_Type = MC_Simulation Set_Steps = 1 50000 Temperature = 1 0 Kappa = 10 0 0 VertexArea = 0 0 0 0 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 0.2 Dynamic_Box = IsotropicFrameTensionOpenMP 1 0 XY TotalAreaCoupling = HarmonicPotential 0 0.34 VisualizationFormat = VTUFileFormat VTU_F 1000 NonbinaryTrajectory = TSI TrajTSI 1000 TimeSeriesData_Period = 100 Restart_Period = 1000 EOF ``` -------------------------------- ### Boundary Conditions Examples Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Defines confinement for membranes using rigid walls or shells. Supports two flat parallel walls, ellipsoidal shells/cores, and cuboid confinement. ```ini ; Two flat parallel walls ; Parameters: thickness, direction (X, Y, or Z) Boundary = TwoFlatParallelWall 2 Z ; Ellipsoidal shell (inner and outer boundary) ; Parameters: thickness, R, a, b, c (aspect ratios) Boundary = EllipsoidalShell 2 10 1 1 1 ; Ellipsoidal core (inner boundary only) ; Parameters: R, a, b, c Boundary = EllipsoidalCore 10 1 1 1 ; Cuboid confinement (Version 1) CoupleToRigidWalls = on Cuboid 10000 10 10 10 ``` -------------------------------- ### Unpack Simulation Data Source: https://github.com/weria-pezeshkian/freedts/wiki/FreeDTS-Tutorials-version-2-(2025) Use this command to unpack the tar archive containing the necessary simulation files. Ensure you have the 'tar' utility installed. ```bash tar -xvzf minimal_example.tar.gz ``` -------------------------------- ### Configure Expanding Core Bead Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Use this input file to start an expanding core bead simulation for a simple membrane system. It sets up Monte Carlo simulation parameters, energy methods, and non-equilibrium commands for expanding the core bead. ```dts Integrator_Type = MC_Simulation Min_Max_Lenghts = 1 3 MinfaceAngle = -0.5 Temperature = 1 0 Box_Centering_F = 0 Set_Steps = 1 5000000 EnergyMethod = FreeDTS1.0_FF Kappa = 10 0 0 Edge_Parameters = 5 0 0 VertexArea = 0 0.7 0 0 TimeSeriesData_Period = 100 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 VolumeCoupling = SecondOrder 0 0.0 0.0 TotalAreaCoupling = HarmonicPotential 1000 0.37 AlexanderMove = MetropolisAlgorithmOpenMP 1 Boundary = EllipsoidalCore 5 1 1 1 NonequilibriumCommands ExpandEllipsoidalCoreWall 100 0.005 VisualizationFormat = VTUFileFormat VTU_F 2000 NonbinaryTrajectory = TSI TrajTSI 2000 Restart_Period = 1000 ``` -------------------------------- ### Parameters for Stomatocyte and Dumbbell Shapes Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Example parameters for achieving specific vesicle shapes like stomatocyte and dumbbell. These involve tuning Kappa for local curvature, GlobalCurvatureCoupling for global curvature, and VolumeCoupling for volume control. ```plaintext Kappa = 20 0 0 GlobalCurvatureCoupling = HarmonicPotential 60 0.3 VolumeCoupling = SecondOrder 0 10000 0.7 ``` -------------------------------- ### FreeDTS Simulation Input for Protein Assembly Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Configure the FreeDTS input file to simulate protein complex assembly in the membrane neck. Adjust protein density and the 'B' parameter for complex rigidity. This setup is for MC_Simulation. ```FreeDTS Integrator_Type = MC_Simulation Min_Max_Lenghts = 1 3 MinfaceAngle = -0.5 Temperature = 1 0 Box_Centering_F = 0 Set_Steps = 1 4000000 EnergyMethod = FreeDTS1.0_FF Kappa = 10 0 0 Edge_Parameters = 5 0 0 VertexArea = 0 0.7 0 0 TimeSeriesData_Period = 100 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 1 Dynamic_Box = IsotropicFrameTensionOpenMP 1 0 XY VisualizationFormat = VTUFileFormat VTU_F 2000 NonbinaryTrajectory = TSI TrajTSI 2000 Restart_Period = 1000 INCLUSION GenerateInclusions Selection_Type Random TypeID 1 2 Density 0.05 0.0 Define 2 Inclusions SRotation Type K KG KP KL C0 C0P C0L lambda lkg lkn cn0 0 Pro1 10 0 10 5 0.0 1 0 Inclusion-Inclusion-Int 1 1 1 2 1.0 -2.0 ``` -------------------------------- ### Prepare top file and run DTS simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Create a topology file (.top) and execute the DTS simulation using the specified input file and topology. This command prepares the system for tension simulations with proteins. ```console echo "G1_PBC_NoPro.q 2" > top.top $path/DTS -in input_G1PBC_wPro.dts -top top.top ``` -------------------------------- ### Prepare Topology and Run FreeDTS Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Create a topology file and then run the FreeDTS simulation using the specified input file and topology. This command initiates the relaxation and equilibration process for the generated membrane mesh. ```console echo "gen20.q 2" > top.top $path/DTS -in input_relaxG20.dts -top top.top ``` -------------------------------- ### Create Topology File with Single Mesh Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Create a simple topology file (.top) that references a single q-format mesh file. The second number indicates the mesh ID. ```bash echo "flat.q 2" > top.top ``` -------------------------------- ### Create Topology File and Run Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Generate a topology file and execute the FreeDTS simulation using the specified input and topology files. ```console echo "G20Stomatocyte_NoPro.q 2" > top.top: $path/DTS -in input_G20_wPro.dts -top top.top ``` -------------------------------- ### Create Topology File with Multiple Meshes Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Create a topology file (.top) that includes multiple mesh files, each with a unique mesh ID. Use '>>' to append to the file. ```bash echo "vesicle.q 1" > top.top echo "membrane.q 2" >> top.top ``` -------------------------------- ### Generate Inclusions with Density Source: https://github.com/weria-pezeshkian/freedts/wiki/Tutorials-with-version-1 Specifies how to randomly generate inclusions based on type and density. Use when starting a simulation from a q file. ```dts GenerateInclusions Selection_Type Random TypeID 1 2 3 Density 0.3 0.1 0 ``` -------------------------------- ### Generate Tetrahedron Surface Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Generate a closed membrane starting shape in the form of a tetrahedron using the GEN binary. Specify dimensions, type, and output file. ```bash $path/GEN -box 100 100 100 -type tetrahedron -N 18 -o tetra.q ``` -------------------------------- ### Run Basic Simulation Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Execute a Monte Carlo simulation using the DTS binary. Requires an input parameter file (.dts) and a topology file (.top). ```bash $path/DTS -in input.dts -top top.top ``` -------------------------------- ### Read Box Dimensions from .tsi File Source: https://github.com/weria-pezeshkian/freedts/blob/master/Files/B_Geiger2025/FrameArea/Analysis_NecksPBC_overAp.ipynb Extracts box dimensions from the second line of a .tsi file. Raises a ValueError if the second line does not start with 'box'. ```python def read_box(file_path): with open(file_path, 'r') as file: lines = file.readlines() second_line = lines[1].strip().split() # Check if the second line starts with 'box' if second_line[0] != 'box': raise ValueError("The second line does not start with 'box'.") # Convert the remaining elements to floats box = [float(value) for value in second_line[1:]] return box ``` -------------------------------- ### Initial Initialize() Function Implementation Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Provides the initial implementation of the `Initialize()` function in `UserDefinedForceonVertices.cpp`. It splits input strings and retrieves all active vertices from the mesh. ```cpp void UserDefinedForceonVertices::Initialize(){ std::vector data = Nfunction::Split(m_Inputs); m_pallV = m_pState->GetMesh()->GetActiveV(); } ``` -------------------------------- ### Configure FreeDTS for Frame Tension Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Set up the input file for FreeDTS to simulate frame tension on a membrane. Adjust parameters like `Dynamic_Box` to control tension and explore neck behavior. ```ini Integrator_Type = MC_Simulation Min_Max_Lenghts = 1 3 MinfaceAngle = -0.5 Temperature = 1 0 Box_Centering_F = 0 Set_Steps = 1 4000000 EnergyMethod = FreeDTS1.0_FF Kappa = 10 0 0 Edge_Parameters = 5 0 0 VertexArea = 0 0.7 0 0 TimeSeriesData_Period = 100 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 1 Dynamic_Box = IsotropicFrameTensionOpenMP 1 1.5 XY VisualizationFormat = VTUFileFormat VTU_F 2000 NonbinaryTrajectory = TSI TrajTSI 2000 Restart_Period = 1000 ``` -------------------------------- ### Generate Flat Bilayer Topology File Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-1 Use the GEN utility to create a 'q' format topology file for flat bilayers with specified dimensions. The box dimensions are set to 50x50x30 units. ```console $path/GEN -box 50 50 30 -type flat -o topol.q ``` -------------------------------- ### Convert Trajectory to TS File Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Converts a trajectory file (TSI) from a previous simulation into a TS file format for further processing. This is used when starting simulations with protein inclusions. ```console $path/CNV -in $path2previous/TrajTSI/dts50.tsi -o flat.q ``` -------------------------------- ### Inclusion Definition Example Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Defines membrane protein inclusions with their mechanical properties and spontaneous curvatures. Includes parameters for symmetry, local curvature modifications, and principal curvature rigidities. ```ini INCLUSION Define 2 Inclusions ; SRotation: symmetry (0=no rotation, 1-6=n-fold symmetry) ; K, KG: local modifications to kappa and kappa_G ; KP, KL: principal curvature rigidities ; C0, C0P, C0L: spontaneous curvatures SRotation Type K KG KP KL C0 C0P C0L lambda lkg lkn cn0 0 Pro1 10 0 0 0 0.6 0 0 0 Pro2 20 0 0 0 -0.4 0 0 ``` -------------------------------- ### Convert TSI frame to q file Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Convert a specific frame from a TSI trajectory file to a q-format file using the CNV binary. This is useful for starting new simulations. ```bash $path/CNV -in TrajTSI/dts40.tsi -o vesicle.q ``` -------------------------------- ### Clone FreeDTS and Navigate to Version 2 Source: https://github.com/weria-pezeshkian/freedts/wiki/FreeDTS-Tutorials-version-2-(2025) Clone the FreeDTS repository and change the directory to the version 2 folder to begin compilation. ```bash git clone git@github.com:weria-pezeshkian/FreeDTS.git cd FreeDTS/version_2 ``` -------------------------------- ### Generate Flat Membrane Surface Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Use the GEN binary to create a flat membrane surface file in q format, with periodic boundary conditions in X and Y. ```bash $path/GEN -box 30 30 100 -type flat -o flat.q ``` -------------------------------- ### Run Simulation with Index File Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Execute a simulation using an index file for vertex groups with the DTS binary. This allows for specific group analysis during simulation. ```bash $path/DTS -in input.dts -top top.top -ndx index.inx ``` -------------------------------- ### Run FreeDTS Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Command to execute the FreeDTS simulation. Requires input and topology files. ```console $path/DTS -in input.dts -top top.top -e 800000 ``` -------------------------------- ### Configure HMFF Simulation Input Source: https://github.com/weria-pezeshkian/freedts/wiki/FreeDTS-Tutorials-version-2-(2025) This is an example of an input '.dts' file for Helfrich Monte Carlo Flexible Fitting. It specifies the energy method, integrator types, and simulation parameters. Ensure 'map.mrc' is the correct path to your density map. ```dts EnergyMethod = FreeDTS1.0_HMFF map.mrc 10 0.0 1 0 0 0.0 0.4 3 0.999 Integrator_Type = MC_Simulation VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 1 InclusionPoseIntegrator = MetropolisAlgorithm 1 1 VisualizationFormat = VTUFileFormat VTU_F 100 NonbinaryTrajectory = TSI TrajTSI 100 Kappa = 20 0 0 ``` -------------------------------- ### Basic Input File Parameters (.dts) Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Fundamental simulation settings for Freedts, including integrator type, steps, temperature, membrane properties, mesh constraints, and output management. ```ini ; Integrator and simulation steps Integrator_Type = MC_Simulation Set_Steps = 1 100000 ; Temperature: beta (1/kT) and delta_beta shift Temperature = 1 0 ; Membrane properties: kappa, kappa_G, spontaneous_curvature Kappa = 20 0 0 ; Vertex area coupling: ka, a, kl, b VertexArea = 0 0 0 0 ; Mesh constraints Min_Max_Lenghts = 1 3 MinfaceAngle = -0.5 ; Vertex position update (serial or OpenMP) VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 ; Edge flip algorithm AlexanderMove = MetropolisAlgorithmOpenMP 1 ; Output management VisualizationFormat = VTUFileFormat VTU_F 1000 NonbinaryTrajectory = TSI TrajTSI 1000 TimeSeriesData_Period = 100 Restart_Period = 1000 ``` -------------------------------- ### Read Simulation Box Size from TSI File Source: https://github.com/weria-pezeshkian/freedts/blob/master/Files/B_Geiger2025/Analysis_NecksStomatocyte.ipynb Extracts the simulation box dimensions from the second line of a TSI file. It expects the line to start with 'box' and converts the subsequent values to floats. Raises a ValueError if the format is incorrect. ```python #read the size of the simulation box from the input .tsi file def read_box(file_path): with open(file_path, 'r') as file: lines = file.readlines() second_line = lines[1].strip().split() # Check if the second line starts with 'box' if second_line[0] != 'box': raise ValueError("The second line does not start with 'box'.") # Convert the remaining elements to floats box = [float(value) for value in second_line[1:]] return box ``` -------------------------------- ### Initialize User-Defined Force Class Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Initializes member variables for the `UserDefinedForceonVertices` class by parsing input strings and retrieving vertex data. Ensure `m_Inputs` is correctly formatted in the input file. ```cpp void UserDefinedForceonVertices::Initialize(){ std::vector data = Nfunction::Split(m_Inputs); m_pallV = m_pState->GetMesh()->GetActiveV(); m_pV1 = m_pallV[Nfunction::String_to_Int(data[0])]; m_pV2 = m_pallV[Nfunction::String_to_Int(data[1])]; m_pV3 = m_pallV[Nfunction::String_to_Int(data[2])]; m_K = Nfunction::String_to_Double(data[3]); } ``` -------------------------------- ### Detect Pore Groups in Outer Mesh (No PBC) Source: https://github.com/weria-pezeshkian/freedts/blob/master/Files/B_Geiger2025/Analysis_NecksStomatocyte.ipynb Identifies and groups unique boundary edges of an outer mesh to detect pore structures. It iteratively finds connected edges until no more connections are found for a group, then starts a new group. Prints the total number of detected pore groups. ```python #for full vesicles: detect edges of the open mesh (inner or outer), group them into necks def poregroupsNoPBC(new_mesh_outer): unique_edges = new_mesh_outer.edges[trimesh.grouping.group_rows(new_mesh_outer.edges_sorted, require_count=1)] edges=unique_edges groups = [] #empty list to store groups while len(edges) > 0: j = edges[0] # Set j to the first edge of unvisited(=not yet removed) boundary edges g = [j] # add the first edge to the current group edges = np.delete(edges, 0, axis=0) # Remove the first edge from the array of unvisited boundary edges while True: found = False for i in edges: if j[0] == i[0] or j[0] == i[1] or j[1] == i[0] or j[1] == i[1]: #if edges touch g.append(i) # Append the current edge to the current group edges = np.delete(edges, np.where(np.all(edges == i, axis=1)), axis=0) # Remove from unvisited edges j = i # Set j to the current edge found = True break # Begin again with the new j if not found: # print('all edges checked, no follower found') groups.append(g) # Append the current group to groups break # Exit the inner while loop to start a new group with the next remaining edge print('Number of detected pore groups:',len(groups)) return groups ``` -------------------------------- ### Run Expanding Core Bead Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Command to execute the FreeDTS simulation using the specified input file and topology file. ```console $path/DTS -in input_expCore.dts -top G20Stomatocyte_NoPro.tsi ``` -------------------------------- ### Active Mesh Analysis Workflow Source: https://github.com/weria-pezeshkian/freedts/blob/master/Files/B_Geiger2025/Analysis_NecksStomatocyte.ipynb Reads a file, creates a mesh, and divides it into inner and outer components. This serves as an initial step for further pore and neck analysis. ```python file='./ExpansionFiles/K10Equil-Pro/TSI506/dts1450.tsi' boxsize=read_box(file) mesh=make_mesh(file, 'noPBC',boxsize,'no') inner_mesh,outer_mesh=inner_outer2(mesh,'no') ``` -------------------------------- ### Set Temperature Parameters Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-2 Configures temperature using 'β' (inverse temperature) and 'Δβ' (shift). Higher 'β' means lower temperature. 'Δβ' shifts acceptance probability, driving the simulation out of equilibrium. ```config ;Temperature = β Δβ Temperature = 1 0 ``` -------------------------------- ### Run FreeDTS Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/FreeDTS-Tutorials-version-2-(2025) Execute the FreeDTS simulation using the specified input file, topology, and parameters. Adjust '-nt' for the number of threads and '-e' for the number of steps. ```bash DTS -in input_hmff.dts -top topol.top -seed 76532 -e 100000 -nt 8 ``` -------------------------------- ### Generate Flat Membrane Topology Source: https://github.com/weria-pezeshkian/freedts/wiki/Tutorials-with-version-1 Use the GEN binary to create a flat membrane topology file in q format. Specify box dimensions and output file name. ```bash $path/GEN -box 30 30 100 -type flat -o topol.q ``` -------------------------------- ### Run Simulation with Seed and Steps Source: https://context7.com/weria-pezeshkian/freedts/llms.txt Run a simulation with a specified random number seed and a defined number of simulation steps using the DTS binary. ```bash $path/DTS -in input.dts -top top.top -seed 76532 -e 100000 ``` -------------------------------- ### Run FreeDTS Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/High-Genus--Membranes Execute the FreeDTS simulation using the specified input and topology files. This command initiates the simulation process. ```bash $path/DTS -in input_tensionPBC_noPro.dts -top G1_PBC_NoPro.tsi ``` -------------------------------- ### Set Simulation Steps Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-2 Defines the initial and final steps for the simulation. Use this to control the total duration of the simulation run. ```config ; Set_Steps = initial_step final_step Set_Steps = 1 5000 ``` -------------------------------- ### Enable Tensionless Membrane Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/Tutorials-with-version-1 Add this line to the input file to make the membrane tensionless and rescale positions. ```ini Frame_Tension = on Position_Rescale 0 5 ``` -------------------------------- ### View FreeDTS Command Line Options Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-2 Use this command to display all available command-line options for the DTS executable. ```bash $PATH/DTS --help ``` -------------------------------- ### Enable Pressure Difference or Fixed Volume Simulation Source: https://github.com/weria-pezeshkian/freedts/wiki/User-Manual-for-version-1 Use this command to simulate with pressure difference or fixed volume. Parameters control the volume constraint equation. ```plaintext Volume_Constraint = on 100 -0.1 0 0 ``` -------------------------------- ### FreeDTS Simulation Input Configuration Source: https://github.com/weria-pezeshkian/freedts/wiki/Single‐Thread-and-Multi‐Thread-Benchmark-and-Performance-Test This configuration file sets up a Monte Carlo simulation using FreeDTS, specifying parameters for integration, energy calculation, thermostat, and parallel execution with OpenMP for various move types. ```config Integrator_Type = MC_Simulation Min_Max_Lenghts = 1 3 MinfaceAngle = -0.5 Temperature = 1.0 0 Set_Steps = 1 100 EnergyMethod = FreeDTS1.0_FF Seed = 52089 Kappa = 20 0 0 VertexArea = 0.0 0.7 0 0 TimeSeriesData_Period = 100 VertexPositionIntegrator = MetropolisAlgorithmOpenMP 1 1 0.05 AlexanderMove = MetropolisAlgorithmOpenMP 1 InclusionPoseIntegrator = MetropolisAlgorithmOpenMP 1 1 Dynamic_Box = IsotropicFrameTensionOpenMP 2 0 XY VisualizationFormat = VTUFileFormat VTU_F 50000 NonbinaryTrajectory = TSI TrajTSI 2000 Restart_Period = 50000 INCLUSION Define 1 Inclusions SRotation Type K KG KP KL C0 C0P C0L 1 Pro1 20.0 0 0 0 0 0 0 GenerateInclusions Selection_Type Random TypeID 1 2 3 Density 0.1 0 0 ``` -------------------------------- ### Compile UserDefinedForceonVertices Class Source: https://github.com/weria-pezeshkian/freedts/wiki/Workshop-2024 Compiles the `UserDefinedForceonVertices.cpp` file into an object file using g++. This command is used to ensure there are no compilation errors before linking. ```bash g++ -c -O3 -std=c++11 UserDefinedForceonVertices.cpp ```