Re: [AMBER] Joining two molecules

From: Daniel Roe <>
Date: Fri, 28 May 2021 09:25:09 -0400

Hi Gustaf,

So I took another look at your molecules, and I have a few thoughts.
Above all, remember that LEaP is really just a bookkeeping program; it
only knows what is in the structure you give it and what is in the
loaded library files. When you load a PDB file, it tries to match
residue and atom names to the loaded library templates in order to
assign atom types (which in turn are used to assign parameters). When
you load a mol2 file, LEaP will try to use the atom types in the mol2

Since cpptraj doesn't have atom type information when you use PDB
files as inputs, it has no idea what atom types to use when writing
the mol2, so it just uses the atom names. This is not going to be
useful for LEaP, so if you use PDB files as your starting structures,
writing out as a mol2 probably isn't your best bet. If you go this
route I would write out a PDB file with the 'conectmode all' option to
get a PDB with all the correct linkages.

However, you now have a new problem. There is a library file for 4HA
and ROH, but not NFM (the formamide substituent), at least not as far
as I know. What's more, the template for 4HA does not have the correct
linkage set up (it will add an extra oxygen according to the

So with all this in mind, this is what I was able to do. First, load
sugar.pdb into leap with glycam, save the topology and restart:

source leaprc.GLYCAM_06j-1
m = loadpdb sugar.pdb
saveamberparm m sugar.parm7 sugar.rst7

Use the topology and restart to load the sugar in cpptraj (instead of
the PDB) for the graft command. This will ensure that at least the
atoms for the sugar part will have the right glycam atom types:

parm sugar.parm7
loadcrd sugar.rst7 parmindex 0 name SUG
<rest of the graft input>

If you load the resulting mol2 in tleap, the ROH and sugar parts will
have all their parameters, but you will still be missing parameters
for the 'NFM' part. If you can't find parameters for NFM,
unfortunately you'll have to parameterize it yourself. You can try and
assign the atom types by analogy (in terms of the protein FF H4 can
probably be H, H7 can probably be H5 which is hydrogen at C with 2
elec. withdrawing groups, and the heavy atoms can stay as N, C, and O)
 but you'll also need to assign charges. Doing this by analogy is
probably not a good idea; you will probably have to do the usual
procedure of creating the NFM fragment, attaching an appropriate
blocking group, calculating the ESP, doing the RESP fit, etc. You
could try to get away with just the AM1-BCC charges (via e.g.
antechamber) since it's a pretty small and inflexible fragment, but
now we're really getting into more scientific questions and not code

There are others on this mailing list who are far more knowledgeable
about force fields and parameterization, so maybe they will have more
or better advice. Good luck!


On Fri, May 28, 2021 at 5:49 AM Gustaf Olsson <> wrote:
> Hello again Dan
> This was my what I was hoping for, however it seems that loading the grafted structure (mol2) into leap using FF/LIB files it should pull parameters in part from GLYCAM and in part from gaff2 (prep/frcmod) based on atom type.
> This is not what I am seeing sadly. From what I could tell doing a quick check, most if not all bond and angle parameters are missing for the entire structure. I have limited experience working with mol2 format so I will have to also do a little research there.
> I will not have time to dig further into this today though I will continue and try to find a solution that works.
> Best regards and thank you
> // Gustaf
> > On 28 May 2021, at 11:34, Daniel Roe <> wrote:
> >
> > Hi Gustaf, glad that 'graft' worked for you.
> >
> > As far as your parameter issue, there are a few things you could try.
> > Probably the most straightforward is to load the structure mol2 from
> > 'graft' into leap (it should still have all the original atom types),
> > note which bonds/angles/dihedrals leap complains are missing
> > parameters, then find the best parameters by analogy in
> > parm10.dat/parm19.dat (or similar) in $AMBERHOME/dat/leap/parm, or you
> > can run the mol2 through antechamber and see what parameters gaff
> > assigns to it (or do both and pick what you think is best).
> >
> > Hope this helps,
> >
> > -Dan
> >
> > On Fri, May 28, 2021 at 4:46 AM Gustaf Olsson <> wrote:
> >>
> >> With some help correcting my input, the graft command worked very well in preparing a “joint” molecular structure by aligning, removing overlapping and “bonding”.
> >>
> >> This its a really nice addition to CPPTRAJ, should solve some problems aligning and bonding structures.
> >>
> >> Thank you very much for the tip, tool and the help Dan, much appreciated. This takes care of generating separate structures and the joint structure, maintaining information available in the input files.
> >>
> >> The remaining problem, for me, is still how to retain the desired parameters from two different FFs when loading this new structure, leaving only the “intersect” with as little manual editing involved as possible.
> >>
> >> Best regards
> >> // Gustaf
> >>
> >>> On 26 May 2021, at 15:33, Daniel Roe <> wrote:
> >>>
> >>> Hi,
> >>>
> >>> On Wed, May 26, 2021 at 5:17 AM Gustaf Olsson <> wrote:
> >>>>
> >>>> bond :1.CB,:1.C2
> >>>>
> >>>> Is :1 the now joined molecule? Otherwise, should I provide the correct residue number :2.X,1.X
> >>>
> >>> No, the bond masks are "<tgt>,<src>" - i.e. they are specific to the
> >>> molecules *before* you join everything. So in the above case, it means
> >>> "bond atom CB in residue 1 of target to atom C2 in residue 1 of
> >>> source". The code will internally update indices to keep track of what
> >>> is what after atoms are removed. Hopefully this clears it up, let me
> >>> know if not
> >>>
> >>> -Dan
> >>>
> >>> _______________________________________________
> >>> AMBER mailing list
> >>>
> >>>
> >>
> >> _______________________________________________
> >> AMBER mailing list
> >>
> >>
> >
> > _______________________________________________
> > AMBER mailing list
> >
> >
> _______________________________________________
> AMBER mailing list

AMBER mailing list
Received on Fri May 28 2021 - 06:30:02 PDT
Custom Search