<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://subhajit-roy-partho.github.io/feed.xml" rel="self" type="application/atom+xml"/><link href="https://subhajit-roy-partho.github.io/" rel="alternate" type="text/html" hreflang="en"/><updated>2025-08-26T04:18:39+00:00</updated><id>https://subhajit-roy-partho.github.io/feed.xml</id><title type="html">blank</title><subtitle>I am a PhD student at Petr Sulc&apos;s Lab, Arizona State University. I am currently persuing computational biophysics with focus on self assembly of genetic materials. I am highly invested in developing coarse grain model of DNA which would allow us to study these assembly at a much quicker pace, otherwise impossible with atomistic approach. I also work with Machine Learning models that could even simplify our life by predicting desired properties without even going through computationally intensive simulations where ever possible. I undertook other application based project like dna cryptography and storage. </subtitle><entry><title type="html">SLURM</title><link href="https://subhajit-roy-partho.github.io/blog/2025/SLURM/" rel="alternate" type="text/html" title="SLURM"/><published>2025-08-25T00:00:00+00:00</published><updated>2025-08-25T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2025/SLURM</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2025/SLURM/"><![CDATA[<h2 id="basic-installation">Basic Installation</h2> <p>Install the pacakages:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt <span class="nb">install</span> <span class="nt">-y</span> munge libmunge-dev
</code></pre></div></div> <p>Create munge keys</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo</span> /usr/sbin/create-munge-key
<span class="nb">sudo chown </span>munge: /etc/munge/munge.key
<span class="nb">sudo chmod </span>400 /etc/munge/munge.key
</code></pre></div></div> <p>If the above fails do it manually with</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>mungekey <span class="nt">--create</span> <span class="nt">--force</span> <span class="nt">--keyfile</span> /etc/munge/munge.key
<span class="nb">sudo chown</span> <span class="nt">-R</span> munge: /etc/munge /var/log/munge /var/lib/munge /run/munge
<span class="nb">sudo chmod </span>0700 /etc/munge /var/log/munge /var/lib/munge
<span class="nb">sudo chmod </span>0755 /run/munge
</code></pre></div></div> <p>Start and check munge</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl <span class="nb">enable </span>munge
<span class="nb">sudo </span>systemctl start munge
<span class="nb">sudo </span>systemctl status munge
munge <span class="nt">-n</span> | unmunge
</code></pre></div></div> <p>Result should be</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>STATUS:          Success (0)
ENCODE_HOST:     user-G4101 (127.0.1.1)
ENCODE_TIME:     2025-08-25 15:05:03 -0700 (1756159503)
DECODE_TIME:     2025-08-25 15:05:03 -0700 (1756159503)
TTL:             300
CIPHER:          aes128 (4)
MAC:             sha256 (5)
ZIP:             none (0)
UID:             subho (1002)
GID:             subho (1002)
LENGTH:          0
</code></pre></div></div> <p>Install wsl slurm of ubuntu with (though it is easier to install, this is old and partial gpu feature often fails, for advance features compile it)</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt <span class="nb">install</span> <span class="nt">-y</span> slurm-wlm
</code></pre></div></div> <h3 id="commands">Commands</h3> <ul> <li>Show fairshare usage for various queue and partitions <code class="language-plaintext highlighter-rouge">sacctmgr show qos</code>.</li> <li>Show user’s fairshare score <code class="language-plaintext highlighter-rouge">sshare -l | grep usernameOrGrpName</code>.</li> <li>To obtain basic partition info <code class="language-plaintext highlighter-rouge">sinfo -p sulcgpu3 -o "%P %a %l %D %t %N"</code> or <code class="language-plaintext highlighter-rouge">sinfo -Nel | grep "sulcgpu3"</code>.</li> <li>For information on a particular node <code class="language-plaintext highlighter-rouge">scontrol show node nodeName</code></li> <li>To obtain queue info use <code class="language-plaintext highlighter-rouge">squeue -p parititonName</code> or <code class="language-plaintext highlighter-rouge">squeue -u userName</code></li> <li>To submit a empty job <code class="language-plaintext highlighter-rouge">sbatch -n 20 --gres=gpu:1 --time=4:00:00 -q sulcgpu1 -p sulcgpu1 --output=/dev/null --error=/dev/null $@ _interactiveScript</code></li> </ul> <p>where the <code class="language-plaintext highlighter-rouge">_interactiveScript</code> can be a very simple command like blank screen.</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="c">#!/bin/sh</span>
<span class="c"># Simple batch script that starts SCREEN.</span>

<span class="nb">exec </span>screen <span class="nt">-Dm</span> <span class="nt">-S</span> slurm<span class="nv">$SLURM_JOB_ID</span>
</code></pre></div></div> <ul> <li>Empty jobs can also be submited using slurm script as given below</li> </ul> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/sh</span>
<span class="c">#SBATCH -q private</span>
<span class="c">#SBATCH -p general</span>
<span class="c">#SBATCH -G a100:1</span>
<span class="c">#SBATCH -t 5-00:00</span>
<span class="c">#SBATCH -c 20</span>
<span class="c">#SBATCH -o empty.out</span>
<span class="c">#SBATCH -e empty.err</span>
<span class="c">#SBATCH -J PHBdnaD</span>

<span class="nb">exec </span>screen <span class="nt">-Dm</span> <span class="nt">-S</span> slurm<span class="nv">$SLURM_JOB_ID</span>
</code></pre></div></div> <p>Now to enter into the submitted job, one can use <code class="language-plaintext highlighter-rouge">srun --pty --jobid=######## /bin/bash</code> or simply <code class="language-plaintext highlighter-rouge">ssh nodeid</code>.</p> <h3 id="setting-up-slurmdbd">Setting up slurmdbd</h3> <ul> <li>Install mariadb <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt-get <span class="nb">install </span>mariadb-server
<span class="nb">sudo </span>systemctl <span class="nb">enable </span>mariadb
<span class="nb">sudo </span>systemctl start mariadb
</code></pre></div> </div> </li> <li>Generate a database to use with slurm using ```bash sudo mysql -u root -p CREATE DATABASE slurm_acct_db; CREATE USER ‘slurmuser’@’localhost’ IDENTIFIED BY ‘slurmPass’; GRANT ALL ON slurm_acct_db.* TO ‘slurmuser’@’localhost’; FLUSH PRIVILEGES; EXIT;</li> </ul> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>- Default port fro mariadb is 3306 use `sudo ss -tulpn` to identify that.
- change the following parameters in mydraid `sudo nvim /etc/mysql/mariadb.conf.d/50-server.cnf`

```bash
innodb_buffer_pool_size = 1G
innodb_lock_wait_timeout = 300
</code></pre></div></div> <ul> <li> <p><code class="language-plaintext highlighter-rouge">sudo systemctl restart mariadb; sudo systemctl status mariadb</code></p> </li> <li> <p><code class="language-plaintext highlighter-rouge">sudo systemctl restart mariadb; sudo systemctl status mariadb</code></p> </li> <li> <p>A sample slurmdb.conf at <code class="language-plaintext highlighter-rouge">/etc/slurm/slurmdbd.conf</code> is given below:</p> </li> </ul> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#</span>
<span class="c"># Sample /etc/slurmdbd.conf</span>
<span class="c">#</span>
<span class="nv">ArchiveEvents</span><span class="o">=</span><span class="nb">yes
</span><span class="nv">ArchiveJobs</span><span class="o">=</span><span class="nb">yes
</span><span class="nv">ArchiveResvs</span><span class="o">=</span><span class="nb">yes
</span><span class="nv">ArchiveSteps</span><span class="o">=</span>no
<span class="nv">ArchiveSuspend</span><span class="o">=</span>no
<span class="nv">ArchiveTXN</span><span class="o">=</span>no
<span class="nv">ArchiveUsage</span><span class="o">=</span>no
<span class="c">#ArchiveScript=/usr/sbin/slurm.dbd.archive</span>
<span class="nv">AuthInfo</span><span class="o">=</span>/var/run/munge/munge.socket.2
<span class="nv">AuthType</span><span class="o">=</span>auth/munge
<span class="nv">DbdHost</span><span class="o">=</span>localhost
<span class="nv">DbdPort</span><span class="o">=</span>6819
<span class="nv">DebugLevel</span><span class="o">=</span>info
<span class="nv">PurgeEventAfter</span><span class="o">=</span>1month
<span class="nv">PurgeJobAfter</span><span class="o">=</span>12month
<span class="nv">PurgeResvAfter</span><span class="o">=</span>1month
<span class="nv">PurgeStepAfter</span><span class="o">=</span>1month
<span class="nv">PurgeSuspendAfter</span><span class="o">=</span>1month
<span class="nv">PurgeTXNAfter</span><span class="o">=</span>12month
<span class="nv">PurgeUsageAfter</span><span class="o">=</span>24month
<span class="nv">LogFile</span><span class="o">=</span>/var/log/slurm/slurmdbd.log
<span class="nv">PidFile</span><span class="o">=</span>/var/run/slurm/slurmdbd.pid
<span class="nv">SlurmUser</span><span class="o">=</span>slurm
<span class="nv">StoragePass</span><span class="o">=</span>slurmPass
<span class="nv">StorageType</span><span class="o">=</span>accounting_storage/mysql
<span class="nv">StorageUser</span><span class="o">=</span>slurmuser
<span class="nv">StoragePort</span><span class="o">=</span>3306
</code></pre></div></div> <ul> <li>Sample slurm.conf at <code class="language-plaintext highlighter-rouge">/etc/slurm/slurm.conf</code> is given below:</li> </ul> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="nv">ClusterName</span><span class="o">=</span>ringtail
<span class="nv">SlurmctldHost</span><span class="o">=</span>ringtail

<span class="nv">MailProg</span><span class="o">=</span>/usr/bin/mail

<span class="nv">ProctrackType</span><span class="o">=</span>proctrack/cgroup

<span class="nv">ReturnToService</span><span class="o">=</span>1
<span class="nv">SlurmctldPidFile</span><span class="o">=</span>/var/run/slurmctld.pid
<span class="nv">SlurmctldPort</span><span class="o">=</span>6817
<span class="nv">SlurmdPidFile</span><span class="o">=</span>/var/run/slurmd.pid
<span class="nv">SlurmdPort</span><span class="o">=</span>6818
<span class="nv">SlurmdSpoolDir</span><span class="o">=</span>/var/spool/slurmd
<span class="nv">SlurmUser</span><span class="o">=</span>slurm
<span class="nv">AuthType</span><span class="o">=</span>auth/munge

<span class="nv">StateSaveLocation</span><span class="o">=</span>/var/spool/slurmctld

<span class="nv">TaskPlugin</span><span class="o">=</span>task/affinity,task/cgroup

<span class="nv">InactiveLimit</span><span class="o">=</span>0
<span class="nv">KillWait</span><span class="o">=</span>30

<span class="nv">MinJobAge</span><span class="o">=</span>300

<span class="nv">SlurmctldTimeout</span><span class="o">=</span>120
<span class="nv">SlurmdTimeout</span><span class="o">=</span>300

<span class="nv">Waittime</span><span class="o">=</span>0

<span class="nv">SchedulerType</span><span class="o">=</span>sched/backfill
<span class="nv">SelectType</span><span class="o">=</span><span class="k">select</span>/cons_tres

<span class="nv">AccountingStorageEnforce</span><span class="o">=</span>limits,qos,safe
<span class="nv">AccountingStorageHost</span><span class="o">=</span>localhost

<span class="nv">AccountingStoragePort</span><span class="o">=</span>6819
<span class="nv">AccountingStorageType</span><span class="o">=</span>accounting_storage/slurmdbd

<span class="nv">JobCompLoc</span><span class="o">=</span>/var/log/slurm/job_completions.log

<span class="nv">JobCompType</span><span class="o">=</span>jobcomp/filetxt

<span class="nv">JobAcctGatherFrequency</span><span class="o">=</span>30

<span class="nv">SlurmctldDebug</span><span class="o">=</span>info
<span class="nv">SlurmctldLogFile</span><span class="o">=</span>/var/log/slurm/slurmctld.log
<span class="nv">SlurmdDebug</span><span class="o">=</span>info
<span class="nv">SlurmdLogFile</span><span class="o">=</span>/var/log/slurm/slurmd.log

<span class="c"># COMPUTE NODES</span>
<span class="nv">GresTypes</span><span class="o">=</span>gpu,mps
<span class="nv">NodeName</span><span class="o">=</span>gpu <span class="nv">CPUs</span><span class="o">=</span>128 <span class="nv">Sockets</span><span class="o">=</span>1 <span class="nv">CoresPerSocket</span><span class="o">=</span>128 <span class="nv">ThreadsPerCore</span><span class="o">=</span>1 <span class="nv">Gres</span><span class="o">=</span>gpu:rtx4060:1,gpu:rtx4080:1,mps:200 <span class="nv">NodeHostname</span><span class="o">=</span>ringtail <span class="nv">NodeAddr</span><span class="o">=</span>ringtail <span class="nv">State</span><span class="o">=</span>idle <span class="nv">RealMemory</span><span class="o">=</span>96092
<span class="nv">PartitionName</span><span class="o">=</span>general <span class="nv">Nodes</span><span class="o">=</span>ALL <span class="nv">Default</span><span class="o">=</span>YES <span class="nv">MaxTime</span><span class="o">=</span>INFINITE <span class="nv">State</span><span class="o">=</span>UP
</code></pre></div></div> <ul> <li> <p><code class="language-plaintext highlighter-rouge">sudo sacctmgr add account generic cluster=ringtail description="Generic Account" organization="SulcLab</code></p> </li> <li> <p><code class="language-plaintext highlighter-rouge">sacctmgr list account</code></p> </li> <li> <p><code class="language-plaintext highlighter-rouge">sudo sacctmgr add user subho account=generic cluster=ringtail</code></p> </li> </ul> <h3 id="conclusion">Conclusion</h3> <p>SLURM is one of the best open source workload manager and is highly used in modern servers.</p> <h3 id="references">References</h3> <ul> <li>https://slurm.schedmd.com/classic_fair_share.html</li> <li>https://slurm.schedmd.com/fair_tree.html</li> </ul>]]></content><author><name></name></author><category term="sample-posts"/><category term="linux"/><category term="slurm"/><summary type="html"><![CDATA[Slurm commands and Management]]></summary></entry><entry><title type="html">oxDNA Simulatiion Guide</title><link href="https://subhajit-roy-partho.github.io/blog/2025/oxDNA-Simulation-Setup/" rel="alternate" type="text/html" title="oxDNA Simulatiion Guide"/><published>2025-08-20T00:00:00+00:00</published><updated>2025-08-20T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2025/oxDNA-Simulation-Setup</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2025/oxDNA-Simulation-Setup/"><![CDATA[<h2 id="oxdna-installations">oxDNA Installations</h2> <div> <button onclick="document.getElementById('compile-block').style.display='block';document.getElementById('container-block').style.display='none';" style="margin-right:10px;">Compile</button> <button onclick="document.getElementById('compile-block').style.display='none';document.getElementById('container-block').style.display='block';">Docker/Singularity</button> </div> <div id="compile-block" style="margin-top:20px;"> <h3>Compile</h3> <p> For oxDNA installation and running it one need to have a C, C++ compiler like gcc,g++, git to download the code, cmake and make to build it and preferably python for oxDNA analysis toolbar and oxpy. ``` cd oxDNA # enter the oxDNA folder mkdir build # create a new build folder. It is good practice to compile out-of-source cd build cmake .. -DCUDA=ON -DPYTHON=ON -CMAKE_BUILD_TYPE=Release #For cpu only installation -DCUDA=OFF and can omit -DPYTHON completely make -j$nproc ``` The binaries will be in build/bin folder. It is recommended to add it in PATH which can be easily accompolished with `echo "PATH="$PATH:/location/to/build/bin" &gt;&gt; ~/.bashrc &amp;&amp; source ~/.bashrc`. </p> </div> <div id="container-block" style="display:none; margin-top:20px;"> <h3>Singularity</h3> <p> One can use docker or singularity to completely avoid the trouble of compiling by using my Docker container, with all the dependencies taken care of. </p> </div> <p>To run a restrained simulation it is advisable to run it with hydrogen bond restrains, which can be generated in oxview, using the following steps:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Dynamics -&gt; Forces -&gt; Set stiffness = ( something between 2 to 5) and Relaxed distance 1.2 -&gt; create from base pair -&gt; Yes.
</code></pre></div></div> <p>It will take some time to search the base pairs and will generarte restrains for all the base pairs. Save the structure top and dat file and also the force file as well.</p> <p>These structure could be simulated with MC then MD with restrains and finally production run without any restrains or max backbone force.</p> <div style="background:rgba(255, 217, 102, 0.84);color:black;padding:12px;border-radius:0px;font-family:monospace;white-space:pre-wrap;overflow-wrap:break-word;"> <b>Assuming Topology = input.top Initial and saved configuration = last_conf.dat</b> <br/>Using the same filename for the initial and saved configuration simplifies restarts: after an interruption, rerunning with the same inputs resumes from the last saved configuration. </div> <h2 id="mc-simulation-1---restrains--max-backbone-force">MC Simulation 1 - Restrains + Max Backbone Force</h2> <p>A sample input for MC simulation with restraints and max backbone force:</p> <p>An astrick # indicates a comment</p> <p>The input section takes all the file input</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>##############################
####  PROGRAM PARAMETERS  ####
##############################
interaction_type=DNA2
salt_concentration=1.0
sim_type = MC
backend = CPU
#backend_precision = mixed
#mismatch_repulsion = 1
#debug = 1
#seed = 42
#CUDA_list = verlet
#CUDA_sort_every = 0
#use_edge = 1
#edge_n_forces = 1

##############################
####    SIM PARAMETERS    ####
##############################
steps = 1e5
max_backbone_force = 10.
ensemble = nvt
delta_translation = 0.02
delta_rotation = 0.04
use_average_seq = no
seq_dep_file = oxDNA2_sequence_dependent_parameters.txt
thermostat = john
T = 25C
dt = 0.003
verlet_skin = 0.6
maxclust = 63
diff_coeff = 2.5
newtonian_steps = 103
max_density_multiplier=5

##############################
####    INPUT             ####
##############################
topology = output.top
conf_file = output.dat
external_forces = 1
external_forces_file = output_force.txt

##############################
####     OUTPUT           ####
##############################
lastconf_file = last_conf.dat
trajectory_file = trajectoryRelaxCPU.dat
max_io = 5
refresh_vel = 1
log_file = log.dat
no_stdout_energy = 0
restart_step_counter = 0
energy_file = energyRelaxCPU.dat
print_conf_interval = 1e4
print_energy_every = 1e4
time_scale = linear
</code></pre></div></div> <h2 id="md-simulation-2---restrains--max-backbone-force">MD Simulation 2 - Restrains + Max Backbone Force</h2> <p>A input with Restrains and Max Backbone Force, starting from the last configuration:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>##############################
####  PROGRAM PARAMETERS  ####
##############################
interaction_type=DNA2
salt_concentration=1.0
sim_type = MD
backend = CUDA
backend_precision = mixed
#mismatch_repulsion = 1
#debug = 1
#seed = 42
CUDA_list = verlet
CUDA_sort_every = 0
use_edge = 1
edge_n_forces = 1

##############################
####    SIM PARAMETERS    ####
##############################
steps = 1e7
max_backbone_force = 10.
ensemble = nvt
delta_translation = 0.02
delta_rotation = 0.04
use_average_seq = no
seq_dep_file = oxDNA2_sequence_dependent_parameters.txt
thermostat = john
T = 25C
dt = 0.003
verlet_skin = 0.6
maxclust = 63
diff_coeff = 2.5
newtonian_steps = 103
max_density_multiplier=5

##############################
####    INPUT             ####
##############################
topology = output.top
conf_file = last_conf.dat
external_forces = 1
external_forces_file = output_force.txt

##############################
####     OUTPUT           ####
##############################
lastconf_file = last_conf.dat
trajectory_file = trajectoryRelaxMD.dat
max_io = 5
refresh_vel = 1
log_file = log.dat
no_stdout_energy = 0
restart_step_counter = 0
energy_file = energyRelaxMD.dat
print_conf_interval = 1e5
print_energy_every = 1e5
time_scale = linear
</code></pre></div></div> <h2 id="md-simulation-3---high-max-backbone-force">MD Simulation 3 - High Max Backbone Force</h2> <div style="background:rgba(255, 217, 102, 0.84);color:black;padding:12px;border-radius:0px;font-family:monospace;white-space:pre-wrap;overflow-wrap:break-word;"> Many a times, it could be useful to check the structure if it is fully relaxed. If relaxed only then proceed with this step, otherwise continue with the above step increasing the max_backbone_force to 20 then to 40, **keeping the restrained on** untill the structure is fully relaxed. This check is very easy to perform visually as there would be a very long bond stretching out or computationally it can be confirmed by running a production simulation with short step like 100. A sample input file would be as follows: ``` ############################## #### PROGRAM PARAMETERS #### ############################## interaction_type=DNA2 salt_concentration=1.0 sim_type = MD backend = CUDA backend_precision = mixed #mismatch_repulsion = 1 #debug = 1 #seed = 42 CUDA_list = verlet CUDA_sort_every = 0 use_edge = 1 edge_n_forces = 1 ############################## #### SIM PARAMETERS #### ############################## steps = 1e2 #max_backbone_force = 10. ensemble = nvt delta_translation = 0.02 delta_rotation = 0.04 use_average_seq = no seq_dep_file = oxDNA2_sequence_dependent_parameters.txt thermostat = john T = 25C dt = 0.005 verlet_skin = 0.6 maxclust = 63 diff_coeff = 2.5 newtonian_steps = 103 max_density_multiplier=5 ############################## #### INPUT #### ############################## topology = output.top conf_file = last_conf.dat #external_forces = 1 #external_forces_file = output_force.txt ############################## #### OUTPUT #### ############################## lastconf_file = last_conf.dat trajectory_file = trajectoryRelaxMD.dat max_io = 5 refresh_vel = 1 log_file = log.dat no_stdout_energy = 0 restart_step_counter = 0 energy_file = energyRelaxMD.dat print_conf_interval = 1e5 print_energy_every = 1e5 time_scale = linear ```` If there is an error with bond the log file will contain error like a bond is unnaturally longer then 1.2. </div> <p>With a fully relaxed structure comment the external forces section and increase the max_backbone_force to 60 or more and run for 1e7 steps. An input file would be something like.</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>##############################
####  PROGRAM PARAMETERS  ####
##############################
interaction_type=DNA2
salt_concentration=1.0
sim_type = MD
backend = CUDA
backend_precision = mixed
#mismatch_repulsion = 1
#debug = 1
#seed = 42
CUDA_list = verlet
CUDA_sort_every = 0
use_edge = 1
edge_n_forces = 1

##############################
####    SIM PARAMETERS    ####
##############################
steps = 1e7
max_backbone_force = 60.
ensemble = nvt
delta_translation = 0.02
delta_rotation = 0.04
use_average_seq = no
seq_dep_file = oxDNA2_sequence_dependent_parameters.txt
thermostat = john
T = 25C
dt = 0.005
verlet_skin = 0.6
maxclust = 63
diff_coeff = 2.5
newtonian_steps = 103
max_density_multiplier=5

##############################
####    INPUT             ####
##############################
topology = output.top
conf_file = last_conf.dat
#external_forces = 1
#external_forces_file = output_force.txt

##############################
####     OUTPUT           ####
##############################
lastconf_file = last_conf.dat
trajectory_file = trajectory.dat
max_io = 5
refresh_vel = 1
log_file = log.dat
no_stdout_energy = 0
restart_step_counter = 0
energy_file = energy.dat
print_conf_interval = 1e5
print_energy_every = 1e5
time_scale = linear
</code></pre></div></div> <h2 id="md-simulation-4---production">MD Simulation 4 - Production</h2> <p>After everything is finished run the final production simulation with the following input file. It is recommended to run it for atleast 1e9 steps. One might also want to run multiple replicas to ensure statistical convergence or to explore the conformational space more thoroughly. dt is recommended = 0.3 to 0.5, could be kept at a lower value if needed, but not higher than 0.5. Also the saving frequency could be adjusted accordingly, generally 1e5 to 5e5 produces a good statistical sampling. Adjusting the verlet skip could help with performance and memory usage.</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>##############################
####  PROGRAM PARAMETERS  ####
##############################
interaction_type=DNA2
salt_concentration=1.0
sim_type = MD
backend = CUDA
backend_precision = mixed
#mismatch_repulsion = 1
#debug = 1
#seed = 42
CUDA_list = verlet
CUDA_sort_every = 0
use_edge = 1
edge_n_forces = 1

##############################
####    SIM PARAMETERS    ####
##############################
steps = 1e9
#max_backbone_force = 10.
ensemble = nvt
delta_translation = 0.02
delta_rotation = 0.04
use_average_seq = no
seq_dep_file = oxDNA2_sequence_dependent_parameters.txt
thermostat = john
T = 25C
dt = 0.003
verlet_skin = 0.6
maxclust = 63
diff_coeff = 2.5
newtonian_steps = 103
max_density_multiplier=5

##############################
####    INPUT             ####
##############################
topology = output.top
conf_file = last_conf.dat
#external_forces = 1
#external_forces_file = output_force.txt

##############################
####     OUTPUT           ####
##############################
lastconf_file = last_conf.dat
trajectory_file = trajectory.dat
max_io = 5
refresh_vel = 1
log_file = log.dat
no_stdout_energy = 0
restart_step_counter = 0
energy_file = energyRelaxMD.dat
print_conf_interval = 1e5
print_energy_every = 1e5
time_scale = linear
</code></pre></div></div> <p>To run the simulation at the same time, one could save the above input files as inputMC, inputMDRelax, inputMDEqui, input. Then write a simple job script to submit all the simulations.</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#!/bin/sh
#SBATCH -q private
#SBATCH -p general
#SBATCH -t 7-00:00
#SBATCH -c 2
#SBATCH -G 1
#SBATCH -o empty.out
#SBATCH -e empty.err
#SBATCH -J oxDNASimulation

module load cuda-12.1.1-gcc-12.1.0 gcc-12.1.0-gcc-11.2.0 cmake eigen-3.4.0-gcc-11.2.0

export CUDA_MPS_PIPE_DIRECTORY=/tmp/mps-pipe_$SLURM_TASK_PID
export CUDA_MPS_LOG_DIRECTORY=/tmp/mps-log_$SLURM_TASK_PID
mkdir -p $CUDA_MPS_PIPE_DIRECTORY
mkdir -p $CUDA_MPS_LOG_DIRECTORY
nvidia-cuda-mps-control -d

echo "Starting jobs"

oxDNA inputMC &gt; outMC.log
oxDNA inputMDRelax &gt; outMDRelax.log
oxDNA inputMDEqui &gt; outMDEqui.log
oxDNA input &gt; out.log

echo "Done"
exec screen -Dm -S slurm$SLURM_JOB_ID

</code></pre></div></div> <div style="background:rgba(255, 217, 102, 0.84);color:black;padding:12px;border-radius:0px;font-family:monospace;white-space:pre-wrap;overflow-wrap:break-word;"> To automate submission of jobs or to get better gpu job control use my <a href="https://github.com/Subhajit-Roy-Partho/sync">sync.sh</a>. </div>]]></content><author><name></name></author><category term="sample-posts"/><category term="compilation"/><category term="tensorflow"/><category term="ml"/><category term="fun"/><summary type="html"><![CDATA[A simple step by step guide to simulation oxDNA with different relaxation technique.]]></summary></entry><entry><title type="html">Linux system setup</title><link href="https://subhajit-roy-partho.github.io/blog/2025/linux-system-setup/" rel="alternate" type="text/html" title="Linux system setup"/><published>2025-05-23T00:00:00+00:00</published><updated>2025-05-23T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2025/linux-system-setup</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2025/linux-system-setup/"><![CDATA[<h2 id="basic-installations">Basic Installations</h2> <div class="tabs-container"> <div class="tab-buttons"> <button class="tab-button active" onclick="openTab(event, 'arch')">Arch Linux</button> <button class="tab-button" onclick="openTab(event, 'debian')">Debian/Ubuntu</button> <button class="tab-button" onclick="openTab(event, 'fedora')">Fedora</button> </div> <div id="arch" class="tab-content" style="display:block;"> <h3>Arch Linux</h3> <pre><code class="language-bash">
    sudo pacman -Syu gcc make cmake python3 python-pip git wget nvim zsh cloudflared openssh rsync rclone
    sudo chsh -s $(which zsh) $(whoami)

# Then, ensure visudo has:
# %wheel ALL=(ALL:ALL) ALL
    </code></pre> </div> <div id="debian" class="tab-content"> <h3>Debian / Ubuntu</h3> <pre><code class="language-bash">
# To add 'myuser' to the 'sudo' group
sudo usermod -aG sudo myuser
    </code></pre> </div> <div id="fedora" class="tab-content"> <h3>Fedora / RHEL / CentOS</h3> <pre><code class="language-bash">
# To add 'myuser' to the 'wheel' group
sudo usermod -aG wheel myuser

# Typically, wheel group is already configured in /etc/sudoers
    </code></pre> </div> </div> <style>.tabs-container{border:1px solid #ccc;border-radius:5px;overflow:hidden;margin-bottom:20px}.tab-buttons{background-color:#f1f1f1;overflow:hidden;border-bottom:1px solid #ccc}.tab-button{background-color:inherit;float:left;border:0;outline:0;cursor:pointer;padding:10px 15px;transition:.3s;font-size:1em}.tab-button:hover{background-color:#ddd}.tab-button.active{background-color:#ccc;border-bottom:2px solid #007bff}.tab-content{display:none;padding:15px;border-top:0}.tab-content h3{margin-top:0}.tab-content pre{background-color:#f9f9f9;border:1px solid #eee;padding:10px;border-radius:4px;overflow-x:auto}.tab-content code{font-family:Consolas,"Courier New",monospace}</style> <script>function openTab(e,t){var a,n,l;for(n=document.getElementsByClassName("tab-content"),a=0;a<n.length;a++)n[a].style.display="none";for(l=document.getElementsByClassName("tab-button"),a=0;a<l.length;a++)l[a].className=l[a].className.replace(" active","");document.getElementById(t).style.display="block",e.currentTarget.className+=" active"}</script> <h2 id="oh-my-zsh-installation">oh-my-zsh installation</h2> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">## Install oh-my-zsh</span>
sh <span class="nt">-c</span> <span class="s2">"</span><span class="si">$(</span>wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh <span class="nt">-O</span> -<span class="si">)</span><span class="s2">"</span>

<span class="c">## Install plugins</span>
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git <span class="k">${</span><span class="nv">ZSH_CUSTOM</span><span class="k">:-</span><span class="p">~/.oh-my-zsh/custom</span><span class="k">}</span>/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions <span class="k">${</span><span class="nv">ZSH_CUSTOM</span><span class="k">:-</span><span class="p">~/.oh-my-zsh/custom</span><span class="k">}</span>/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search <span class="k">${</span><span class="nv">ZSH_CUSTOM</span><span class="k">:-</span><span class="p">~/.oh-my-zsh/custom</span><span class="k">}</span>/plugins/zsh-history-substring-search

<span class="c">## Replace the default plugins with the following</span>
<span class="nb">sed</span> <span class="nt">-i</span>.bak <span class="s1">'/^plugins=.*/c\
plugins=(\
  git\
  zsh-syntax-highlighting\
  zsh-autosuggestions\
  zsh-history-substring-search\
)'</span> ~/.zshrc
</code></pre></div></div> <h2 id="generate-ssh-keys">Generate SSH keys</h2> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh-keygen <span class="nt">-t</span> ed25519 <span class="nt">-C</span> <span class="s2">"pc"</span>
<span class="nb">cat</span> ~/.ssh/id_ed25519.pub
</code></pre></div></div> <h2 id="add-servers">Add servers</h2> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">mkdir</span> <span class="nt">-p</span> ~/.ssh
<span class="nb">echo</span> <span class="s2">"Host gila
        Hostname gila.navraj.me
        User gila
        Port 22
        ProxyCommand cloudflared access ssh --hostname %h
Host sol
        Hostname sol.asu.edu
        User sroy85
        Port 22
        ProxyJump gila"</span> <span class="o">&gt;&gt;</span> ~/.ssh/config
    
</code></pre></div></div> <h2 id="add-zshrc-functions">Add zshrc functions</h2> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mo<span class="o">()</span> <span class="o">{</span>
  <span class="c"># Check if an argument was provided</span>
  <span class="k">if</span> <span class="o">[</span> <span class="nt">-z</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
    </span><span class="nb">echo</span> <span class="s2">"Usage: mo &lt;directory_name&gt;"</span>
    <span class="k">return </span>1 <span class="c"># Indicate an error</span>
  <span class="k">fi</span>

  <span class="c"># Attempt to create the directory.</span>
  <span class="c"># -p: no error if existing, make parent directories as needed</span>
  <span class="c"># --: ensures that $1 isn't misinterpreted as an option if it starts with '-'</span>
  <span class="k">if </span><span class="nb">mkdir</span> <span class="nt">-p</span> <span class="nt">--</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span><span class="p">;</span> <span class="k">then</span>
    <span class="c"># If mkdir was successful, try to cd into it</span>
    <span class="k">if </span><span class="nb">cd</span> <span class="nt">--</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span><span class="p">;</span> <span class="k">then
      return </span>0 <span class="c"># Success</span>
    <span class="k">else
      </span><span class="nb">echo</span> <span class="s2">"Error: Successfully created directory '</span><span class="nv">$1</span><span class="s2">', but could not cd into it."</span> <span class="o">&gt;</span>&amp;2
      <span class="k">return </span>1 <span class="c"># Indicate an error</span>
    <span class="k">fi
  else</span>
    <span class="c"># mkdir failed. mkdir itself usually prints an error.</span>
    <span class="c"># We can add a generic one too.</span>
    <span class="nb">echo</span> <span class="s2">"Error: Could not create directory '</span><span class="nv">$1</span><span class="s2">'."</span> <span class="o">&gt;</span>&amp;2
    <span class="k">return </span>1 <span class="c"># Indicate an error</span>
  <span class="k">fi</span>
<span class="o">}</span>
</code></pre></div></div>]]></content><author><name></name></author><category term="sample-posts"/><category term="compilation"/><category term="tensorflow"/><category term="ml"/><category term="fun"/><summary type="html"><![CDATA[Code to setup complete linux system from scratch.]]></summary></entry><entry><title type="html">All atom MD simulation of DNA with small molecule</title><link href="https://subhajit-roy-partho.github.io/blog/2024/all-atom-DNA-simulation/" rel="alternate" type="text/html" title="All atom MD simulation of DNA with small molecule"/><published>2024-10-01T00:00:00+00:00</published><updated>2024-10-01T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2024/all-atom-DNA-simulation</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2024/all-atom-DNA-simulation/"><![CDATA[<h2 id="avogadro">Avogadro</h2>]]></content><author><name></name></author><category term="sample-posts"/><category term="coding"/><summary type="html"><![CDATA[A description on how to simulate DNA duplex with small molecules covalently attached at different positions]]></summary></entry><entry><title type="html">ZSH terminal</title><link href="https://subhajit-roy-partho.github.io/blog/2024/zsh-terminal/" rel="alternate" type="text/html" title="ZSH terminal"/><published>2024-09-15T00:00:00+00:00</published><updated>2024-09-15T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2024/zsh-terminal</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2024/zsh-terminal/"><![CDATA[<ul> <li>Install oh my zsh <code class="language-plaintext highlighter-rouge">sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"</code>.</li> <li>Change theme to avit in ~/.zshrc</li> <li>Plugins: <ul> <li>zsh-syntax-highlighting <code class="language-plaintext highlighter-rouge">git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting</code></li> <li>zsh-autosuggestions <code class="language-plaintext highlighter-rouge">git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions</code></li> <li>add the puligins to</li> </ul> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="nv">plugins</span><span class="o">=(</span>git
  zsh-syntax-highlighting
  zsh-autosuggestions
  <span class="o">)</span>
    
</code></pre></div> </div> </li> </ul>]]></content><author><name></name></author><category term="sample-posts"/><category term="coding"/><summary type="html"><![CDATA[Ram up the terminal.]]></summary></entry><entry><title type="html">ARM Linux Server</title><link href="https://subhajit-roy-partho.github.io/blog/2024/ARMserver/" rel="alternate" type="text/html" title="ARM Linux Server"/><published>2024-09-07T00:00:00+00:00</published><updated>2024-09-07T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2024/ARMserver</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2024/ARMserver/"><![CDATA[<h3 id="important-notes">Important Notes</h3> <ul> <li>Welcome message is in file <code class="language-plaintext highlighter-rouge">/etc/motd</code>, and ASCII art looks great in there.</li> <li>OS choices <ol> <li>Debian</li> <li>Fedora</li> <li>Arch</li> <li>Ubuntu (May even damage firmware)</li> </ol> </li> </ul> <h3 id="useful-software">Useful Software</h3> <h5 id="desktop-environments">Desktop Environments</h5> <ul> <li>Xfce is one of the best and easy to configure desktop environment.</li> <li>To install it <code class="language-plaintext highlighter-rouge">sudo apt install xfce4</code></li> <li>to start it <code class="language-plaintext highlighter-rouge">startxfce4</code> from tty terminal.</li> </ul> <h3 id="fixes">Fixes</h3> <h5 id="slurm-gpu-segregation-fix">SLURM GPU segregation fix</h5> <p>Slurm uses nvml to detect the number of gpus, segregate them during running, and this api was not working for my case.</p> <ul> <li>Find the library location <code class="language-plaintext highlighter-rouge">sudo find / -name "libnvidia-ml.so"</code> , for my case this was <code class="language-plaintext highlighter-rouge">/usr/local/cuda-12.2/targets/sbsa-linux/lib/stubs/libnvidia-ml.so</code></li> <li>Copy this to <code class="language-plaintext highlighter-rouge">/usr/lib</code></li> <li>Add header location to <code class="language-plaintext highlighter-rouge">/etc/profile</code> , for my case it was <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">export </span><span class="nv">C_INCLUDE_PATH</span><span class="o">=</span><span class="s2">"/usr/local/cuda-12.2/targets/sbsa-linux/include:</span><span class="nv">$C_INCLUDE_PATH</span><span class="s2">"</span>
<span class="nb">export </span><span class="nv">CPLUS_INCLUDE_PATH</span><span class="o">=</span><span class="s2">"/usr/local/cuda-12.2/targets/sbsa-linux/include:</span><span class="nv">$CPLUS_INCLUDE_PATH</span><span class="s2">"</span>
</code></pre></div> </div> </li> <li>By default <code class="language-plaintext highlighter-rouge">/usr/lib</code> should be in ldconfig still one can add that in <code class="language-plaintext highlighter-rouge">/etc/ld.so.conf.d . sudo ldconfig</code></li> <li>Also here is a c code to check nvml, use <code class="language-plaintext highlighter-rouge">gcc nvml.c -lnvidia-ml; ./a.out</code>. If it outputs the correct number of gpu, I guess everything should be configured.</li> </ul> <div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#include</span> <span class="cpf">&lt;stdio.h&gt;</span><span class="cp">
#include</span> <span class="cpf">&lt;nvml.h&gt;</span><span class="cp">
</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
    <span class="n">nvmlReturn_t</span> <span class="n">result</span><span class="p">;</span>
    <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">device_count</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>

    <span class="c1">// Initialize NVML library</span>
    <span class="n">result</span> <span class="o">=</span> <span class="n">nvmlInit</span><span class="p">();</span>

    <span class="k">if</span> <span class="p">(</span><span class="n">NVML_SUCCESS</span> <span class="o">!=</span> <span class="n">result</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">printf</span><span class="p">(</span><span class="s">"Failed to initialize NVML: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">nvmlErrorString</span><span class="p">(</span><span class="n">result</span><span class="p">));</span>
        <span class="k">return</span> <span class="mi">1</span><span class="p">;</span>
    <span class="p">}</span>

    <span class="c1">// Get the number of GPUs</span>
    <span class="n">result</span> <span class="o">=</span> <span class="n">nvmlDeviceGetCount</span><span class="p">(</span><span class="o">&amp;</span><span class="n">device_count</span><span class="p">);</span>

    <span class="k">if</span> <span class="p">(</span><span class="n">NVML_SUCCESS</span> <span class="o">!=</span> <span class="n">result</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">printf</span><span class="p">(</span><span class="s">"Failed to get device count: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">nvmlErrorString</span><span class="p">(</span><span class="n">result</span><span class="p">));</span>
        <span class="n">nvmlShutdown</span><span class="p">();</span>
        <span class="k">return</span> <span class="mi">1</span><span class="p">;</span>
    <span class="p">}</span>
    <span class="n">printf</span><span class="p">(</span><span class="s">"Number of GPUs detected: %u</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">device_count</span><span class="p">);</span>

    <span class="c1">// Clean up NVML library</span>
    <span class="n">result</span> <span class="o">=</span> <span class="n">nvmlShutdown</span><span class="p">();</span>

    <span class="k">if</span> <span class="p">(</span><span class="n">NVML_SUCCESS</span> <span class="o">!=</span> <span class="n">result</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">printf</span><span class="p">(</span><span class="s">"Failed to shutdown NVML: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">nvmlErrorString</span><span class="p">(</span><span class="n">result</span><span class="p">));</span>
        <span class="k">return</span> <span class="mi">1</span><span class="p">;</span>

    <span class="p">}</span>
    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div> <h3 id="nvidia-kernel-stuff">Nvidia kernel stuff</h3> <ul> <li>To rebuild the kernel simply <code class="language-plaintext highlighter-rouge">sudo akmods --force</code></li> <li>Logs should be in <code class="language-plaintext highlighter-rouge">/var/cache/akmods/nvidia/{Kernel Version}</code></li> <li>Check kernel version with <code class="language-plaintext highlighter-rouge">uname -srm</code></li> </ul> <h3 id="bad-ideas">Bad ideas</h3> <ul> <li>Never change /usr/bin/gcc to /usr/bin/gcc-13 from default gcc-14 (or whatever your version is). Same for g++. It breaks core system files including nvidia drivers akmod.</li> </ul>]]></content><author><name></name></author><category term="sample-posts"/><category term="coding"/><summary type="html"><![CDATA[ARM Linux Server]]></summary></entry><entry><title type="html">Mouse and Keyboard share</title><link href="https://subhajit-roy-partho.github.io/blog/2024/Mouse-keyboard-share/" rel="alternate" type="text/html" title="Mouse and Keyboard share"/><published>2024-09-07T00:00:00+00:00</published><updated>2024-09-07T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2024/Mouse-keyboard-share</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2024/Mouse-keyboard-share/"><![CDATA[<ul> <li>Install it using package manager or build it from the github repo.</li> <li>Generate the self signed SSL key at <code class="language-plaintext highlighter-rouge">.local/share/barrier/SSL</code> this should be either in <code class="language-plaintext highlighter-rouge">/home/$USER</code> or <code class="language-plaintext highlighter-rouge">/home/$USER/snap/barrier-*/2</code>.</li> </ul> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd</span> <span class="s2">"SSL path"</span>
<span class="nb">mkdir</span> <span class="nt">-p</span> Fingerprints
openssl req <span class="nt">-x509</span> <span class="nt">-nodes</span> <span class="nt">-days</span> 365 <span class="nt">-subj</span> /CN<span class="o">=</span>barrier <span class="nt">-newkey</span> rsa:4096 <span class="nt">-keyout</span> Barrier.pem <span class="nt">-out</span> Barrier.pem
openssl x509 <span class="nt">-fingerprint</span> <span class="nt">-sha256</span> <span class="nt">-noout</span> <span class="nt">-in</span> Barrier.pem <span class="o">&gt;</span> Fingerprints/Local.txt
<span class="nb">sed</span> <span class="nt">-e</span> <span class="s2">"s/.*=/v2:sha256:/"</span> <span class="nt">-i</span> Fingerprints/Local.txt
</code></pre></div></div> <ul> <li>Set the server config by draging in new pc to left or right.</li> <li>Start the server.</li> <li>Start the client with the server IP. If everything is right client would flash server SSL and in next message would prompt configuration is ready.</li> </ul>]]></content><author><name></name></author><category term="sample-posts"/><category term="coding"/><summary type="html"><![CDATA[A short description on how to share mouse and keyboard using Barrier open source software.]]></summary></entry><entry><title type="html">ZSH initial setup</title><link href="https://subhajit-roy-partho.github.io/blog/2024/zsh/" rel="alternate" type="text/html" title="ZSH initial setup"/><published>2024-09-07T00:00:00+00:00</published><updated>2024-09-07T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2024/zsh</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2024/zsh/"><![CDATA[<h2 id="zsh">ZSH</h2> <ul> <li>Install oh-my-zsh <code class="language-plaintext highlighter-rouge">sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"</code></li> <li>Update in ~/.zshrc file</li> </ul> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">ZSH_THEME</span><span class="o">=</span><span class="s2">"avit"</span>
<span class="nv">plugins</span><span class="o">=(</span>
  git
  zsh-syntax-highlighting
  zsh-autosuggestions
  zsh-history-substring-search
<span class="o">)</span>
</code></pre></div></div> <ul> <li> <p>Install syntax-highlight using `</p> </li> <li> <p>Install autosuggestion using <code class="language-plaintext highlighter-rouge">git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions</code></p> </li> <li> <p>Install zsh history substring search <code class="language-plaintext highlighter-rouge">git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/</code>git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingzsh-history-substring-search`</p> </li> </ul>]]></content><author><name></name></author><category term="sample-posts"/><category term="coding"/><summary type="html"><![CDATA[A short description on how to share mouse and keyboard using Barrier open source software.]]></summary></entry><entry><title type="html">C++ Tips</title><link href="https://subhajit-roy-partho.github.io/blog/2024/C++/" rel="alternate" type="text/html" title="C++ Tips"/><published>2024-08-17T00:00:00+00:00</published><updated>2024-08-17T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2024/C++</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2024/C++/"><![CDATA[<h4 id="ofstream-file-opening-parameters">Ofstream file opening parameters</h4> <ul> <li><code class="language-plaintext highlighter-rouge">std::ios::ate</code> - full file is available for writting and the pointer will be at the end of the file in the beginning.</li> <li><code class="language-plaintext highlighter-rouge">std::ios::app</code> - starts writting at the end of the file and existing porting is non writable.</li> <li><code class="language-plaintext highlighter-rouge">std::ios::trunc</code> - will delete everything in the file and starts writting afresh.</li> <li><code class="language-plaintext highlighter-rouge">std::ios::out</code> - used to creat a file if doesn’t exists, writting behaviour is dependant on <code class="language-plaintext highlighter-rouge">trunc</code> or <code class="language-plaintext highlighter-rouge">ate</code> etc.</li> <li><code class="language-plaintext highlighter-rouge">std::ios::binary</code> - most useful mode to generate binary files.</li> </ul>]]></content><author><name></name></author><category term="sample-posts"/><category term="coding"/><summary type="html"><![CDATA[C++ Tips]]></summary></entry><entry><title type="html">Docker Commands</title><link href="https://subhajit-roy-partho.github.io/blog/2024/Docker/" rel="alternate" type="text/html" title="Docker Commands"/><published>2024-08-17T00:00:00+00:00</published><updated>2024-08-17T00:00:00+00:00</updated><id>https://subhajit-roy-partho.github.io/blog/2024/Docker</id><content type="html" xml:base="https://subhajit-roy-partho.github.io/blog/2024/Docker/"><![CDATA[<h3 id="run-container">Run Container</h3> <ul> <li><code class="language-plaintext highlighter-rouge">docker run --rm</code> delets the containers after the run is finished.</li> <li><code class="language-plaintext highlighter-rouge">docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi</code> - run using nvidia gpu <strong>all</strong> can be substituted with <strong>device=0</strong> to select a specific gpu.</li> </ul> <h3 id="container-commands">Container Commands</h3> <ul> <li><code class="language-plaintext highlighter-rouge">docker container ls -a</code> list all the containers</li> </ul>]]></content><author><name></name></author><category term="sample-posts"/><category term="coding"/><summary type="html"><![CDATA[Docker commands]]></summary></entry></feed>