### Install TS2CG from Source Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Download-and-install-TS2CG Clone the repository and install locally, optionally using a virtual environment. ```console git clone https://github.com/weria-pezeshkian/TS2CG-v2.0 cd TS2CG-v2.0 python3 -m venv venv && source venv/bin/activate # Not required, but often convenient. pip3 install . ``` -------------------------------- ### Install TS2CG from GitHub Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Download-and-install-TS2CG Install the latest version directly from the GitHub repository. ```console pip3 install git+https://github.com/weria-pezeshkian/TS2CG-v2.0 ``` -------------------------------- ### Install TS2CG from Source Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Clone the TS2CG repository from GitHub and install it from the source code using pip. ```bash git clone https://github.com/weria-pezeshkian/TS2CG-v2.0 cd TS2CG-v2.0 pip3 install . ``` -------------------------------- ### Example system.top file for 1D Fourier-shaped POPC bilayer Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-6 This is an example of the topology file generated by PCG for a 1D Fourier-shaped POPC bilayer system. ```plaintext ;This file was generated by TS2CG membrane builder script i.e., PCG    [ system ]    Expect a large membrane    [ molecules ]   ; domain 0    ;  in the upper monolayer        POPC  585     ; domain 0    ;  in the lower monolayer        POPC  585      ``` -------------------------------- ### q File Format Structure Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Example of the q file format used as input for the PLM executable. ```text 50.000 50.000 50.000 1840 0 21.4 33.8 32.7 0 1 38.1 26.1 32.3 0 2 40.9 24.2 19.9 0 ... 1839 31.2 323.2 23 0 3680 0 75 776 1043 1 1 796 1821 752 1 2 995 1027 279 1 3 662 1162 56 1 4 167 38 391 1 ... ``` -------------------------------- ### View generated topology Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-1 Example of the system.top file generated by the PCG script. ```text ;This file was generated by TS2CG membrane builder script i.e., PCG [ system ] Expect a large membrane [ molecules ] ; domain 0 ; in the upper monolayer POPC 6256 ; domain 0 ; in the lower monolayer POPC 3876 ``` -------------------------------- ### Run Solvation Command Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Example command to execute the solvation tool with specific input, output, ion, and template files. ```console SOL -in in.gro -o out.gro -ion 20 20 -tem water.gro ``` -------------------------------- ### Run TS2CG command line Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Example command to execute TS2CG with specific parameters for surface generation. ```console TS2CG PLM -TSfile Traj1.tsi -bilayerThickness 4 -rescalefactor 3 3 3 -o output ``` -------------------------------- ### Install TS2CG via PyPi Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Download-and-install-TS2CG Install the package using pip. Note that the PyPi repository may not contain the latest development versions. ```console pip3 install TS2CG ``` -------------------------------- ### Initial System Setup with TS2CG PLM Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-3 Use this command to set up the initial simulation system before defining lipid domains. Ensure the -TSfile points to your system's topology file. ```bash TS2CG PLM -TSfile Sphere_2.tsi -bilayerThickness 3.8 -rescalefactor 4 4 4 ``` -------------------------------- ### Check CMake Version Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Download-and-install-TS2CG Verify that CMake version 3.10 or later is installed on the system. ```console cmake --version ``` -------------------------------- ### Topology File Content Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-3 Example output of the generated system.top file showing lipid distribution across domains and monolayers. ```text ;This file was generated by TS2CG membrane builder script i.e., PCG [ system ] Expect a large membrane [ molecules ] ; domain 0 ; in the upper monolayer POPC 5834 ; domain 0 ; in the lower monolayer POPC 3614 ; domain 1 ; in the upper monolayer DOPC 259 ; domain 1 ; in the lower monolayer DOPC 160 ; domain 2 ; in the upper monolayer POPE 162 ; domain 2 ; in the lower monolayer POPE 100 ``` -------------------------------- ### GROMACS Coordinate File Structure Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Example of a .gro file format showing atom positions and velocities. ```text TS2CG manual 6 1WATER OW1 1 0.126 1.624 1.679 0.1227 -0.0580 0.0434 1WATER HW2 2 0.190 1.661 1.747 0.8085 0.3191 -0.7791 1WATER HW3 3 0.177 1.568 1.613 -0.9045 -2.6469 1.3180 2WATER OW1 4 1.275 0.053 0.622 0.2519 0.3140 -0.1734 2WATER HW2 5 1.337 0.002 0.680 -1.0641 -1.1349 0.0257 2WATER HW3 6 1.326 0.120 0.568 1.9427 -0.8216 -0.0244 1.82060 1.82060 1.82060 ``` -------------------------------- ### Load Point Folder Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-9 Load an existing point folder to start modifying the membrane structure. ```python point=TS2CG.core.point.Point("./point_tut4_start") ``` -------------------------------- ### View Inclusion Data Format Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-8 Example of the IncData.dat file structure showing protein IDs, types, and coordinates. ```text < Inclusion NoInc 3 > < id typeid pointid lx ly lz > 0 1 5 0.499 -0.864 0.059 1 1 22 0.481 -0.765 -0.429 2 2 30 -0.177 -0.945 0.275 ``` -------------------------------- ### Get TS2CG Help Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Display help information for the main TS2CG executable and its subcommands like SOL, PLM, and PCG. ```console TS2CG -h ``` ```console TS2CG {SOL,PLM,PCG,...} -h ``` -------------------------------- ### PCG Input File Structure Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Example of an .str input file used for configuring lipids, domains, and protein inclusions. ```text include protein.gro [Lipids List] ;LipidName RatioUp RatioDown Area/Lipid Domain 0 POPC 0.5 0.5 0.63 POPE 0.5 0.5 0.64 End Domain 1 POPC 0.5 0.5 0.63 POPE 0.5 0.5 0.64 End [Shape Data] ShapeType Flat Box 40 40 40 Density 2 2 Thickness 3.8 WallRange 0 1 0 1 End [Protein List] ;ProteinName Incl.Id Surface_Coverage 0 0 z-position STxB 1 0.5 0 0 -1.1 end Protein ``` -------------------------------- ### Lipid Library (.LIB) File Format Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Example format for a .LIB file used by PCG, defining bead positions for different lipid types. Includes Martini map and CG information. ```text Description Martini Map CG Version Martini 3 ;Martini 3 lipid library for TS2CG 2.0 [POPC] ; BeadID BeadName X-offset Y-offset Z-offset 1 NC3 0 0 1 2 PO4 0 0 0 3 GL1 0 0 -1 4 GL2 0 0.5 -1 5 C1A 0 0 -2 6 D2A 0 0 -3 7 C3A 0 0 -4 8 C4A 0 0 -5 9 C1B 1 0 -2 10 C2B 1 0 -3 11 C3B 1 0 -4 12 C4B 1 0 -5 [POPE] 1 NH3 0 0 1 2 PO4 0 0 0 3 GL1 0 0 -1 4 GL2 0.5 0 -1 5 C1A 0 0 -2 6 D2A 0 0 -3 7 C3A 0 0 -4 8 C4A 0 0 -5 9 C1B 1 0 -2 10 C2B 1 0 -3 11 C3B 1 0 -4 12 C4B 1 0 -5 [CDL0] ; Cardiolipin - 4 acyl chains 1 GL0 0.5 1 1 2 PO41 0 0 0 3 GL11 0 0 -1 4 GL12 0 1 -1 5 C1A1 0 0 -2 ... ``` -------------------------------- ### Configure TS2CG CMake Project Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/CMakeLists.txt Sets the project requirements, C++ standard, and defines subdirectories and installation targets. ```cmake cmake_minimum_required(VERSION 3.10) project(TS2CG) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_subdirectory(TS2CG/cpp/Solvate) add_subdirectory(TS2CG/cpp/Pointillism) add_subdirectory(TS2CG/cpp/MembraneBuilder) install(TARGETS SOL PLM PCG RUNTIME DESTINATION TS2CG) ``` -------------------------------- ### Get All Exclusions Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/Tutorials/tut9/Tutorial9.ipynb Retrieves all exclusion zones defined for the system. Useful for inspecting existing exclusions before making changes. ```python point.exclusions.get_all() ``` -------------------------------- ### Define lipid composition Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-1 Example content for an input.str file defining the lipid domain and area per lipid. ```text [Lipids List] Domain 0 POPC 1 1 0.64 End ``` -------------------------------- ### Define Domain in Sphere.tsi Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-3 Example of a line in the .tsi file with the domain ID appended to the end. ```text 45 23.4753129908 28.0982228567 26.6006234584 2 ``` -------------------------------- ### Define GROMACS Topology File Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md A complete example of a .top file defining a Urea molecule in water, including force field parameters, atomic definitions, and system constraints. ```GROMACS Topology ; ; Example topology file ; ; The force-field files to be included #include "amber99.ff/forcefield.itp" [ moleculetype ] ; name nrexcl Urea 3 [ atoms ] 1 C 1 URE C 1 0.880229 12.01000 ; amber C type 2 O 1 URE O 2 -0.613359 16.00000 ; amber O type 3 N 1 URE N1 3 -0.923545 14.01000 ; amber N type 4 H 1 URE H11 4 0.395055 1.00800 ; amber H type 5 H 1 URE H12 5 0.395055 1.00800 ; amber H type 6 N 1 URE N2 6 -0.923545 14.01000 ; amber N type 7 H 1 URE H21 7 0.395055 1.00800 ; amber H type 8 H 1 URE H22 8 0.395055 1.00800 ; amber H type [ bonds ] 1 2 1 3 1 6 3 4 3 5 6 7 6 8 [ dihedrals ] ; ai aj ak al funct definition 2 1 3 4 9 2 1 3 5 9 2 1 6 7 9 2 1 6 8 9 3 1 6 7 9 3 1 6 8 9 6 1 3 4 9 6 1 3 5 9 [ dihedrals ] 3 6 1 2 4 1 4 3 5 4 1 7 6 8 4 [ position_restraints ] ; you wouldn't normally use this for a molecule like Urea, ; but we include it here for didactic purposes ; ai funct fc 1 1 1000 1000 1000 ; Restrain to a point 2 1 1000 0 1000 ; Restrain to a line (Y-axis) 3 1 1000 0 0 ; Restrain to a plane (Y-Z-plane) [ dihedral_restraints ] ; ai aj ak al type phi dphi fc 3 6 1 2 1 180 0 10 1 4 3 5 1 180 0 10 ; Include TIP3P water topology #include "amber99.ff/tip3p.itp" [ system ] Urea in Water [ molecules ] ;molecule name nr. Urea 1 SOL 1000 ``` -------------------------------- ### tsi File Format Structure Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Example of the tsi file format, which contains DTS simulation trajectory outputs including vertices, triangles, and inclusions. ```text version 1.1 box 50.000 50.000 50.000 vertex 1840 0 21.4 33.8 32.7 0 1 38.1 26.1 32.3 0 2 40.9 24.2 19.9 0 ... 1839 31.2 323.2 23 0 triangle 3680 0 75 776 1043 1 1 796 1821 752 1 2 995 1027 279 1 3 662 1162 56 1 4 167 38 391 1 ... inclusion 3 0 1 22 0 1 1 1 5 0 1 2 2 30 0 1 ``` -------------------------------- ### Generated Topology File Structure Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-2 This is an example of the topology file generated by the TS2CG PCG tool. It lists the counts of each lipid type in different domains of the system. ```text ;This file was generated by TS2CG membrane builder script i.e., PCG [ system ] Expect a large membrane [ molecules ] ; domain 0 ; in the upper monolayer POPC 3056 DOPC 3056 ; domain 0 ; in the lower monolayer POPC 1893 DOPC 1893 ``` -------------------------------- ### Get Help for TS2CG DOP Command Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-7 This command displays the help message for the TS2CG DOP tool, showing expected input formats and available options for modifying point folders. ```bash TS2CG DOP -h ``` -------------------------------- ### TSI File Format Structure Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Example structure of a TSI (Triangulated Surface Input) file, detailing version, box dimensions, vertex coordinates, triangle connectivity, and optional inclusion/exclusion zone data. ```text version 1.1 box 50.000 50.000 50.000 vertex 1840 0 21.4 33.8 32.7 0 1 38.1 26.1 32.3 0 2 40.9 24.2 19.9 0 ... 1839 31.2 323.2 23 0 triangle 3680 0 75 776 1043 1 1 796 1821 752 1 2 995 1027 279 1 ... inclusion 3 0 1 5 0 1 1 1 22 0 1 2 2 30 0 1 exclusion 1 0 30 1 ``` -------------------------------- ### Display SOL help information Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Displays the help menu for the solvation executable. ```console TS2CG SOL -h ``` -------------------------------- ### Membrane Builder (PCG) from Point Folder Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Build a membrane system using a specified point folder as input. This allows for building from pre-generated point data. ```bash TS2CG PCG -dts point -str input.str -Bondlength 0.2 -LLIB Martini3.LIB -defout system ``` -------------------------------- ### Access TS2CG Help Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Download-and-install-TS2CG Display the main help menu or module-specific help for Pointillism, Membrane Builder, and Solvate. ```console TS2CG --help ``` ```console TS2CG PLM -h ``` ```console TS2CG PCG -h ``` ```console TS2CG SOL -h ``` -------------------------------- ### Assign Lipid Domain ID Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-5 Example of a vertex line in the .tsi file updated with a lipid domain ID. ```text 5     22.0396876425     23.6080597437     26.8858740866    1 ``` -------------------------------- ### Configure input.str File Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-5 Final structure of the input.str file including lipid domains and protein definitions. ```text include P1.gro include P2.gro [Lipids List] Domain 0 POPC 1 1 0.64 End Domain 1 DOPC 1 1 0.64 End Domain 2 POPE 1 1 0.64 End [Protein List] protein1 1 0.01 0 0 -2.5 ``` -------------------------------- ### Generate Initial Point Folder with PCG Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-7 Use the PCG command with the -WPointDir flag to create an initial point folder for the specified shape. This folder contains InnerBM.dat and OuterBM.dat. ```bash TS2CG PCG -str input.str -function analytical_shape -defout system -WPointDir ``` -------------------------------- ### Build Bilayer Vesicle with PCG Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-8 Constructs the final system using the modified point folder. ```bash TS2CG PCG -str input_vesicle.str -Bondlength 0.2 -LLIB "./files/Martini3.LIB" -dts ./point_vesicle_new2 -incdirtype Local -defout system_vesicle ``` -------------------------------- ### Complete Workflow: Vesicle with Proteins (Bash) Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt A multi-step bash script demonstrating a full workflow from a TS file to a solvated membrane system with proteins, using TS2CG and GROMACS commands. ```bash # Step 1: Generate point representation from TS file TS2CG PLM -TSfile Sphere.tsi -bilayerThickness 3.8 -rescalefactor 4 4 4 -o point # Step 2: Add circular lipid domains around protein positions TS2CG DAI -p point -r 4 -d 1 -t 1 # Domain 1 around protein type 1 TS2CG DAI -p point -r 4 -d 2 -t 2 # Domain 2 around protein type 2 # Step 3: Build membrane with proteins # input.str content: # include P1.gro # include P2.gro # [Lipids List] # Domain 0 # POPC 1 1 0.64 # End # Domain 1 # DOPC 1 1 0.64 # End # Domain 2 # POPE 1 1 0.64 # End # [Protein List] # protein1 1 0.01 0 0 -2.5 # protein2 2 0.01 0 0 -2.5 # End Protein TS2CG PCG -str input.str -dts point -Bondlength 0.2 -LLIB Martini3.LIB -defout system # Step 4: Energy minimization in vacuum (GROMACS) gmx grompp -f em.mdp -c system.gro -p system.top -o em.tpr -maxwarn 1 gmx mdrun -v -deffnm em # Step 5: Short equilibration in vacuum gmx grompp -f eq_vacuum.mdp -c em.gro -p system.top -o eq_v.tpr -maxwarn 1 gmx mdrun -v -deffnm eq_v # Step 6: Solvate the system TS2CG SOL -in eq_v.gro -tem water.gro -o solvated.gro -Rcutoff 0.32 -ion 50 50 # Add water/ion counts from info.txt to system.top # Step 7: Production simulation (GROMACS) gmx grompp -f prod.mdp -c solvated.gro -p system.top -o prod.tpr gmx mdrun -v -deffnm prod ``` -------------------------------- ### Initialize TS2CG Environment Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-9 Import necessary libraries and the TS2CG framework to begin membrane modifications. ```python # We do some imports to help us with our different steps below: import numpy as np # And we load TS2CG to get access to the framework import TS2CG ``` -------------------------------- ### Get Inclusions by Type Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/Tutorials/tut9/Tutorial9.ipynb Retrieves all inclusions of a specific type. Useful for filtering and processing specific protein types. ```python point.inclusions.get_by_type(2) ``` -------------------------------- ### Membrane Builder (PCG) Basic Usage Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Build a simple POPC vesicle by placing lipids onto a point representation. Requires an input string file (.str), a bond length, and a lipid library file. ```bash TS2CG PCG -str input.str -Bondlength 0.2 -LLIB Martini3.LIB -defout system ``` -------------------------------- ### Define Lipid Ratios and Shape Parameters in .str File Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-7 This .str file defines the lipids to be used and the shape of the membrane. It's a prerequisite for generating the initial point folder. ```plaintext ;lipidnname ratio_up ratio_down APL POPC 1 1 0.64 ;Not necessary in this step but shouldn´t be removed. End [Shape Data] ShapeType 1D_PBC_Fourier Box 30 10 20 WallRange 0 1 0 1 Density 3 1 Thickness 4 Mode 1.5 1 0 Mode 2.5 2 0 End ``` -------------------------------- ### Curvature-Based Lipid Placement Workflow (Bash) Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt A bash script demonstrating how to place lipids based on preferred membrane curvature using the DOP tool. It involves creating a point folder, defining lipid preferences, and running the DOP tool. ```bash # Step 1: Create point folder for analytical shape TS2CG PCG -str input_shape.str -function analytical_shape -defout system -WPointDir # Step 2: Create domain_input.txt with lipid curvature preferences # ; domain lipid percentage c0 density # 0 POPC .7 0.0 0.64 # 1 CDL0 .3 -0.5 1.2 # CDL0 with negative c0 will be placed in negatively curved regions # Step 3: Run DOP to assign domains based on curvature TS2CG DOP -s domain_input.txt -ni input_DOP.str -k 10 # Step 4: Build membrane with curvature-assigned domains TS2CG PCG -dts point -str input_DOP.str -LLIB Martini3.LIB -defout system # Higher k values increase the precision of curvature-based placement ``` -------------------------------- ### Execute PCG script Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-1 Places lipids onto the generated points using the composition file and a lipid library. ```bash TS2CG PCG -str input.str -Bondlength 0.2 -LLIB ./files/Martini3.LIB -defout system ``` -------------------------------- ### Get Protein Inclusions by Type with Python Point Class Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Filter and retrieve protein inclusions of a specific type using the `.inclusions.get_by_type(type_id)` method. ```python # Get inclusions by protein type type1_proteins = point.inclusions.get_by_type(1) ``` -------------------------------- ### Run CG Membrane Builder Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/Tutorials/tut9/Tutorial9.ipynb Executes the CG Membrane builder with specified parameters. Use this to generate membrane structures based on input files and settings. ```bash !TS2CG PCG -str input.str -Bondlength 0.2 -LLIB Martini3.LIB -defout system -dts point_tut4_start ``` -------------------------------- ### Get All Inclusions Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/Tutorials/tut9/Tutorial9.ipynb Retrieves and displays all current inclusions within the Point object. The result is a dictionary containing details like id, type_id, point_id, and orientation for each inclusion. ```python #First, let's look at the inclusions we got. point.inclusions.get_all() # We see a dictionary of all the inclusions, their id, their type and their location on the point grid as the point id. ``` -------------------------------- ### Generate Point Folder with PLM Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-8 Initializes a point folder from a TS file for subsequent protein placement. ```bash TS2CG PLM -TSfile Sphere.tsi -bilayerThickness 3.8 -rescalefactor 4 4 4 -o point_vesicle ``` -------------------------------- ### Get All Protein Inclusions with Python Point Class Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Retrieve all protein inclusions using the `.inclusions.get_all()` method. The output includes details like `id`, `type_id`, `point_id`, and `orientation`. ```python # Get all protein inclusions all_inclusions = point.inclusions.get_all() print(all_inclusions) # Output: [{'id': 0, 'type_id': 1, 'point_id': 5, 'orientation': array([...])}, ...] ``` -------------------------------- ### Complete .str File with Lipids and Proteins Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-4 The final .str file includes lipid definitions and protein definitions. This configuration is used to set up the simulation environment. ```plaintext include P1.gro include P2.gro [Lipids List] Domain 0 ; lipidnname ratio_up ratio_down APL POPC 1 1 0.64 End [Protein List] protein1 1 0.01 0 0 -2.5 protein2 2 0.01 0 0 -2.5 End Protein ``` -------------------------------- ### Execute PCG for 1D Fourier-shaped POPC bilayer Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-6 Command to run PCG with a specified .str input file to generate a 1D Fourier-shaped POPC bilayer system. Outputs are system.gro and system.top. ```bash TS2CG PCG -str input.str -Bondlength 0.2 -LLIB ./files/Martini3.LIB -defout system -function analytical_shape    ``` -------------------------------- ### Create Circular Domain with TS2CG DAI Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-3 Use the DAI module to create a circular lipid domain. Specify the points for domain creation, the desired radius (-r), and the domain ID (-d). This example creates domain 1 around points [5, 22] with a radius of 4. ```bash TS2CG DAI -p point -r 4 -d 1 -m 5,22 ``` -------------------------------- ### Membrane Builder (PCG) with Wall Beads Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Generate wall beads for shape preservation when building membrane systems from analytical shapes. Specify the wall bead name with -WallBName. ```bash TS2CG PCG -str input.str -function analytical_shape -LLIB Martini3.LIB -defout system -Wall -WallBName WL ``` -------------------------------- ### Solvation with Ions Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Add ions during solvation using the `-ion` flag followed by the number of positive and negative ions. Ensure the template water file (`-tem`) is compatible. ```bash # Add ions (20 positive and 20 negative) TS2CG SOL -in system.gro -tem water.gro -o solvated.gro -Rcutoff 0.32 -ion 20 20 ``` -------------------------------- ### Membrane Builder (PCG) Generate Point Folder Only Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Generate only the point folder for a membrane system, useful for further modification with advanced Python tools like DOP, DAI, or INU. Does not build the full system. ```bash TS2CG PCG -str input.str -function analytical_shape -defout system -WPointDir ``` -------------------------------- ### Generate Vesicle Vertex Positions Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-4 Use this command to generate a .gro file containing the vertex positions of a vesicle. This is a prerequisite for identifying protein placement locations. ```bash TS2CG PLM -TSfile Sphere.tsi -bilayerThickness 0 -rescalefactor 0.2 0.2 0.2 ``` -------------------------------- ### Save and Generate Structure Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-9 Save the modified point folder and execute the PCG command to generate the system structure. ```python # Now we overwrite the point folder with our altered version. point.save() #Let's run PCG and look at the new inclusion. !TS2CG PCG -str input.str -Bondlength 0.2 -LLIB Martini3.LIB -defout system -dts point_tut4_start ``` ```python !TS2CG PCG -str input.str -Bondlength 0.2 -LLIB Martini3.LIB -defout system -dts point_tut4_start ``` -------------------------------- ### Include Protein .gro Files in .str Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-4 Include the protein .gro files at the top of your input.str file. This makes the protein structure data available for simulation. ```plaintext include P1.gro include P2.gro ``` -------------------------------- ### Create 1D Fourier-shaped POPC bilayer .str file Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-6 This .str file defines a 1D Fourier-shaped POPC bilayer, including lipid composition and shape parameters. It's used as input for the PCG command. ```plaintext [Lipids List] Domain      0 POPC        1 1 0.64  End   [Shape Data] ShapeType 1D_PBC_Fourier Box         30     10     20 WallRange   0      1      0     1 Density     3      1 Thickness   3.8 Mode        1.5    1     0 Mode        2.5    2     0 End ``` -------------------------------- ### TS2CG Command Line Options Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md This section details the available command-line options for the TS2CG tool, including their types, default values, and descriptions. ```APIDOC ## TS2CG Command Line Options ### Description Command line options for the TS2CG tool. ### Parameters #### Command Line Options - **-rescalefactor** (rx ry rz) - Default: (1 1 1) - Rescaling factor - **-bilayerThickness** (double) - Default: 3.8 - Bilayer thickness - **-monolayer** (int) - Default: 0 - To generate monolayer instead (1/-1). - **-r** (string) - Default: PLM - Function (PLM/in_out/check/add_pbc). - **-smooth** (------) - Default: no - Might be necessary for rough surfaces. - **-o** (string) - Default: point - Name of the output folder. - **-resizebox** (------) - Default: no - Find a better box for the system. - **-TSfile** (string) - Default: TS.tsi - TS file name (three file format types: *.q, *.tsi, *.dat). - **-Mashno** (int) - Default: 1 - Number of Mosaicing, your point number grows as 4^Mashno. - **-AlgType** (string) - Default: Type1 - Algorithm type for Mosaicing (Type1 and Type2); no difference has been reported yet. ### Notes - The approximated area per lipid does not need to be precise, it will be modified during the later processes. - The number of the output points is always larger or equal the number of the vertices in the input triangulated surface. With option `-Mashno` you can tune how many points you want (No_of_vertex*4^Mashno). - There is no guarantee to get proper surface if rx, ry, rz are not equal. - Use Mashno [1-4], unless you know what you are doing. ### Usage Example ```console TS2CG PLM -TSfile Traj1.tsi -bilayerThickness 4 -rescalefactor 3 3 3 -o output ``` ``` -------------------------------- ### Generate Curved Membrane Point Folder Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-8 Generates a point folder specifically for a curved membrane structure. ```bash TS2CG PLM -TSfile prep/Small_Curved.tsi -bilayerThickness 3.8 -rescalefactor 4 4 4 ``` -------------------------------- ### Membrane Builder (PCG) Analytical Shapes Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Build membrane systems based on analytical shapes without needing a triangulated surface file. Specify the shape using the -function analytical_shape flag. ```bash TS2CG PCG -str input.str -function analytical_shape -LLIB Martini3.LIB -defout system ``` -------------------------------- ### Basic Solvation with Water Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Use `TS2CG SOL` to add coarse-grained water and ions. Specify input (`-in`), template water (`-tem`), and output (`-o`) files. `-Rcutoff` defines the cutoff radius for solvation. ```bash # Basic solvation TS2CG SOL -in system.gro -tem water.gro -o solvated.gro -Rcutoff 0.32 ``` -------------------------------- ### Define 1D Fourier Shape in .str file Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-6 Define a 1D periodic structure with Fourier modes in a .str file. Requires ShapeType, Box, Density, Thickness, WallRange, and Mode parameters. ```plaintext 1D Fourier Shape [Shape Data] ShapeType    1D_PBC_Fourier  Box    30    10    20 Density     3     1 Thickness    3.8     WallRange    0     1    0    1 Mode         1.5   1    0 Mode         2.5   2    0   End ``` -------------------------------- ### Run TS2CG with custom parameters Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/blob/master/README.md Executes the TS2CG program with specified DTS folder, input file, seed, and bond length. ```console TS2CG PCG -dts point -str input.str -seed 39234 -Bondlength 0.15 ``` -------------------------------- ### Define Flat Shape in .str file Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-6 Configure a flat membrane shape in a .str file. Essential parameters are ShapeType, Box, Density, Thickness, and WallRange. ```plaintext Flat [Shape Data] ShapeType    Flat         Box    40    40    40 Density      2     2 Thickness    3.8  WallRange    0     1    0    1 End                            ``` -------------------------------- ### PCG flags for generating wall beads Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-6 Use these flags with the PCG command to generate wall beads. This will produce Wall.itp and Wall.pdb files in addition to the standard .top and .gro files. ```bash -Wall -WallBName WL ``` -------------------------------- ### Execute TS2CG PLM and PCG Commands Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-4 Commands to generate a POPC membrane and process protein structures. ```bash TS2CG PLM -TSfile Sphere.tsi -bilayerThickness 3.8 -rescalefactor 4 4 4 ``` ```bash TS2CG PCG -str input.str -Bondlength 0.2 -LLIB ./files/Martini3.LIB -defout system ``` -------------------------------- ### Create Domain Around Manual Points Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Use `TS2CG DAI` to create lipid domains. Specify domain ID (`-d`), radius (`-r`), and points using `-m`. The `-p point` flag indicates point-based assignment. ```bash # Create domain around manually specified points TS2CG DAI -p point -r 4 -d 1 -m 5,22 # Creates domain ID 1 with radius 4 around points 5 and 22 ``` -------------------------------- ### Solvation with Custom Ion Names and Seed Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Specify custom ion names using `-pname` and `-nname`, and set a random seed for reproducibility with `-seed`. ```bash # Custom ion names and seed TS2CG SOL -in system.gro -tem water.gro -o solvated.gro -Rcutoff 0.4 -ion 50 50 -pname NA -nname CL -seed 12345 ``` -------------------------------- ### Pointillism (PLM) with Increased Point Density Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Generate a point representation from a membrane triangulated surface file with increased point density. Specify an output folder for the generated points. ```bash TS2CG PLM -TSfile membrane.tsi -bilayerThickness 3.8 -rescalefactor 3 3 3 -Mashno 2 -o output_folder ``` -------------------------------- ### Pointillism (PLM) Monolayer Generation Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Generate a point representation for a single monolayer instead of a bilayer. Use the -monolayer flag with a value of 1. ```bash TS2CG PLM -TSfile Sphere.tsi -bilayerThickness 3.8 -rescalefactor 4 4 4 -monolayer 1 ``` -------------------------------- ### Solvate (SOL) CLI Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt The SOL executable solvates membrane systems by adding coarse-grained water and ions around the membrane structure. ```APIDOC ## SOL - Add Water and Ions ### Description Solvates membrane systems by adding coarse-grained water and ions around the membrane structure. ### Parameters #### Command Line Arguments - **-in** (string) - Required - Input system file (.gro) - **-tem** (string) - Required - Template water file (.gro) - **-o** (string) - Required - Output file name - **-Rcutoff** (float) - Required - Cutoff radius for solvation - **-ion** (int, int) - Optional - Number of positive and negative ions to add - **-pname** (string) - Optional - Custom name for positive ions - **-nname** (string) - Optional - Custom name for negative ions - **-seed** (int) - Optional - Random seed for reproducibility ### Request Example TS2CG SOL -in system.gro -tem water.gro -o solvated.gro -Rcutoff 0.32 -ion 20 20 ``` -------------------------------- ### Run PLM operation Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-1 Executes the pointillism operation to increase vertex count and generate monolayers from a .tsi file. ```bash TS2CG PLM -TSfile Sphere.tsi -bilayerThickness 3.8 -rescalefactor 4 4 4 ``` -------------------------------- ### Execute PCG Tool in TS2CG Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-2 Utilize the PCG tool with a .str input file to place lipids on generated points. Requires a library file and defines output names. ```bash TS2CG PCG -str input.str -Bondlength 0.2 -LLIB ./files/Martini3.LIB -defout system    ``` -------------------------------- ### Define Lipid Domains and Curvature Parameters Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-7 This domain_input.txt file specifies the lipids, their proportions, their preferred curvature (C0), and area per lipid. It's used by TS2CG DOP to modify the point folder. ```plaintext ; domain lipid percentage c0 density 0 POPC .7 0.0 0.64 1 CDL0 .3 -0.5 1.2 ``` -------------------------------- ### Create Domain with Larger Radius for Protein Type Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Create a domain with a larger radius for a specific protein type by adjusting the `-r` value. ```bash # Create domain around specific protein type with larger radius TS2CG DAI -p point -r 5 -d 2 -t 2 # Creates domain ID 2 with radius 5 around all proteins of type 2 ``` -------------------------------- ### Run PCG with Updated Input Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-9 Execute the TS2CG PCG tool with a modified input string to incorporate new lipids into a specified domain. Ensure the input string and library file are correctly referenced. ```bash !TS2CG PCG -str input_POPE.str -Bondlength 0.2 -LLIB Martini3.LIB -defout system -dts point_tut4_start ``` -------------------------------- ### INU with Reproducible Seed Source: https://context7.com/weria-pezeshkian/ts2cg-v2.0/llms.txt Ensure reproducibility for `TS2CG INU` by specifying a random seed using the `--seed` flag. ```bash # Specify random seed for reproducibility TS2CG INU -p point -n 5 -t 1 -r 4 --seed 12345 -o point_seeded ``` -------------------------------- ### Build Lipid Bilayer with Modified Point Folder using PCG Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-7 This PCG command builds the final lipid bilayer using the modified point folder and .str file generated by TS2CG DOP. It produces system.top and system.gro files. ```bash TS2CG PCG -dts point -str input_DOP.str -LLIB ./files/Martini3.LIB -defout system ``` -------------------------------- ### Place Proteins in Curved Region with TS2CG INU Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-8 Use the INU command to place a specified number of proteins of a certain type into a region with negative curvature. Adjust parameters like 'k' to control amplification and leaflet placement. ```bash TS2CG INU -p point_SmallCurved -n 10 -t 1 -r 5 -c -0.5 -k 100 -o point_SmallCurved_new ``` -------------------------------- ### Define Protein and Lipid Domains for Simulation Source: https://github.com/weria-pezeshkian/ts2cg-v2.0/wiki/Tutorial-5 This configuration defines protein and lipid domains for simulation, with proteins positioned at specified vertices and surrounded by their designated lipid domains. Ensure correct formatting for simulation input. ```plaintext protein2 2 0.01 0 0 -2.5 End Protein ```