Skip to content
Snippets Groups Projects
Commit 26f83ed0 authored by James Graham's avatar James Graham
Browse files

Remove support for Python 3.2, 3.3. Add 3.6

parent c94a15f1
No related branches found
No related tags found
No related merge requests found
language: python language: python
python: python:
- "3.2"
- "3.3"
- "3.4" - "3.4"
- "3.5" - "3.5"
- "3.6"
script: py.test script: py.test
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# pdb2lmp # pdb2lmp
Convert PDB files to LAMMPS data and force field files. Convert PDB files to LAMMPS data and force field files.
Requires Python 3.4 or greater.
## Aim ## Aim
This program uses a library of pre-defined molecule, atom, and bond types to convert PDB or GRO files into LAMMPS input DATA (topology) and FF (forcefield) files. It was inspired by the GROMACS tool PDB2GMX as an attempt to make it easier to setup simulations using the [ELBA forcefield](https://github.com/orsim/elba-lammps). It should however be more broadly applicable to molecular simulation in LAMMPS in general. This program uses a library of pre-defined molecule, atom, and bond types to convert PDB or GRO files into LAMMPS input DATA (topology) and FF (forcefield) files. It was inspired by the GROMACS tool PDB2GMX as an attempt to make it easier to setup simulations using the [ELBA forcefield](https://github.com/orsim/elba-lammps). It should however be more broadly applicable to molecular simulation in LAMMPS in general.
......
...@@ -80,8 +80,7 @@ class PDB2LMP: ...@@ -80,8 +80,7 @@ class PDB2LMP:
def collect_type(values, counter, db_vals, typelist, stylelist, nextmol_name): def collect_type(values, counter, db_vals, typelist, stylelist, nextmol_name):
for val in values: for val in values:
try: try:
regex = re.compile(val.ifnext) if re.fullmatch(val.ifnext, nextmol_name) is None:
if regex.fullmatch(nextmol_name) is None:
continue continue
except AttributeError: except AttributeError:
pass pass
...@@ -198,8 +197,7 @@ class PDB2LMP: ...@@ -198,8 +197,7 @@ class PDB2LMP:
atom_list = list(mol_db.atoms.keys()) atom_list = list(mol_db.atoms.keys())
for bond in getattr(mol_db, header.lower()): for bond in getattr(mol_db, header.lower()):
try: try:
regex = re.compile(bond.ifnext) if re.fullmatch(bond.ifnext, nextmol_name) is None:
if regex.fullmatch(nextmol_name) is None:
continue continue
except AttributeError: except AttributeError:
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment