I want to conduct all-atom MD simulations of PNIPAM oligomers to be comparable to the work by Tavagnacco in 2018 (https://doi.org/10.1039/C8CP00537K), with some variations involving different comonomers.

To achieve this, I generate Gromacs (.gro and .itp) files using http://polypargen.com. I aim to assign individual residues for my monomers to better analyse all interactions. The atom names are provided in forms like C01Y and H035, or as regular expressions: (C\d+).

What is a simple method to convert these files into a readable PDB file format suitable for software like the Python module RDKit?

How can I assign residual names to the different monomers automatically without manually looking up the indices? To make it worse the result file

I attempted to match the substructure in Python but encountered issues with it not working.

```python

from rdkit import Chem

# NIPAM monomer without double bonding

NIPAM_smiles = "CCC(=O)NC(C)(C)"

NIPAM_mol =  Chem.MolFromSmiles(NIPAM_smiles)

Polymer_mol = Chem.MolFromPDBFile(PdbOrGro_path)

monomer_matches =  Polymer_mol.GetSubstructMatches(NIPAM_mol)

for match in monomer_matches:

print(match) #no matches

```

I hope to retrieve the indices for the monomers I am seeking.

Thank you in advance for any assistance.

Similar questions and discussions