Minor edits for python2/3 support, improved comments

This commit is contained in:
Oliver Henrich
2024-05-03 11:23:42 +01:00
parent 3906eb8148
commit ca675b557f
3 changed files with 26 additions and 8 deletions

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
@ -16,16 +15,23 @@
/* ----------------------------------------------------------------------
Contributing author: Oliver Henrich (University of Strathclyde, Glasgow)
------------------------------------------------------------------------- */
"""
Program: generate.py
"""
Import basic modules
Generates a simple initial ssDNA or dsDNA configuration from a given sequence.
For dsDNA the sequence should be preceded by the 'DOUBLE' keyword.
Usage:
$$ python generate.py box_offset box_length sequence_file
"""
# for python2/3 compatibility
from __future__ import print_function
#!/usr/bin/env python
"""
Import basic modules
"""
import sys, os, timeit
from timeit import default_timer as timer

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
@ -32,6 +31,13 @@ The LAMMPS trajectory input file needs to contain the following data columns:
id mol type x y z vx vy vz c_quat[1] c_quat[2] c_quat[3] c_quat[4]
"""
# for python2/3 compatibility
from __future__ import print_function
#!/usr/bin/env python
"""
Import basic modules
"""
import sys, math, subprocess
# converts quaternion DOF into local body reference frame

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
@ -17,16 +16,23 @@
Contributing author: Oliver Henrich (University of Strathclyde, Glasgow)
------------------------------------------------------------------------- */
Program:
Program: nbps.py
Calculates the number of base pairs based on proximity of hydrogen bonding
interaction sites in oxDNA2.
Usage:
$$ python
$$ python nbps.py input_filename output_filename
Requirements:
The LAMMPS trajectory input file needs to contain the following data columns:
id mol type x y z c_quat[1] c_quat[2] c_quat[3] c_quat[4]
"""
# for python2/3 compatibility
from __future__ import print_function
#!/usr/bin/env python
import sys, math, subprocess
# converts quaternion DOF into local body reference frame