For calculating topologies via antechamber


In [1]:
from acpype_lib.acpype import ACTopol, MolTopol
import os

Directory where the Ligand.acpype folder will be saved


In [2]:
print(os.getcwd())


/home/lkagami

In [3]:
molecule = ACTopol('/home/lkagami/Downloads/Ligand.mol2')


WARNING: no charge value given, trying to guess one...
==> ... charge set to 0

In [4]:
molecule.createACTopol()


==> Executing Antechamber...
==> AC output file present... doing nothing
==> * Antechamber OK *
==> * Parmchk OK *
==> Topologies files already present... doing nothing
==> * Tleap OK *
==> Removing temporary files...

In [5]:
molecule.createMolTopol()


==> Writing NEW PDB file

==> Writing CNS/XPLOR files

==> Writing GROMACS files

==> Writing GMX dihedrals for GMX 4.5 and higher.

==> Writing CHARMM files

==> Pickle file Ligand.pkl already present... doing nothing

For an example of ACPYPE amb2gmx feature:


In [6]:
mol = MolTopol(acFileXyz='/home/lkagami/Ligand.acpype/Ligand_AC.inpcrd', acFileTop='/home/lkagami/Ligand.acpype/Ligand_AC.prmtop', debug=True)


DEBUG: prmtop and inpcrd files loaded
DEBUG: basename defined = 'SUB'
DEBUG: getCoords done
DEBUG: getABCOEFs done
DEBUG: charge to be balanced: total  0.0000000001
DEBUG: balanceCharges done
DEBUG: Balanced TotalCharge -0.0000000000
DEBUG: PBC = None
DEBUG: getAtoms done
DEBUG: getBonds done
DEBUG: getAngles done
DEBUG: getDihedrals done

In [7]:
mol.writeGromacsTopolFiles(amb2gmx=True)


==> Writing GROMACS files

DEBUG: writing GRO file
DEBUG: Box size estimated
DEBUG: atomTypes 14
DEBUG: GMX atomtypes done
DEBUG: atoms 43
DEBUG: GMX atoms done
DEBUG: bonds 44
DEBUG: GMX bonds done
DEBUG: atomPairs 92
DEBUG: GMX pairs done
DEBUG: angles 76
DEBUG: GMX angles done
DEBUG: setProperDihedralsCoef done
DEBUG: properDihedralsCoefRB 98
DEBUG: properDihedralsAlphaGamma 0
DEBUG: properDihedralsGmx45 107
==> Writing GMX dihedrals for GMX 4.5 and higher.

DEBUG: GMX special proper dihedrals done
DEBUG: improperDihedrals 13
DEBUG: GMX improper dihedrals done