Amber-MD / cpptraj

Biomolecular simulation trajectory/data analysis.
Other
138 stars 64 forks source link

Add 'charge' keyword to 'keep' and 'strip' to scale total charge of remaining atoms. #1054

Closed drroe closed 1 year ago

drroe commented 1 year ago

6.21.1.

Adds a new keyword charge to the strip and keep commands that will allow the charges of the remaining atoms to be scaled so the sum of the charges matches a user-specified total. For example, the following input loads 3 fragments from Mol2 files, removes some atoms and scales the charges, defines head and/or tail atoms, the connects them with sequence:

set DIR = ../Test_Graft
parm \$DIR/DDD.names.mol2
loadcrd \$DIR/DDD.names.mol2 name Sugar parm DDD.names.mol2
parm \$DIR/MP1.names.mol2
loadcrd \$DIR/MP1.names.mol2 name Phos parm MP1.names.mol2
parm \$DIR/ADD.names.mol2
loadcrd \$DIR/ADD.names.mol2 name Base parm ADD.names.mol2
#list
# Strip components
crdaction Base  strip charge  0.116  @C1,H1,H6,H7
crdaction Sugar keep  charge  0.2933 keepmask !(@C4,H6,H7,H8,H12,H11,O1,H1)
crdaction Phos  strip charge -1.4093 @C3,H4,H5,H6,O1,C1,H1,H2,H3
# Set connect atoms
dataset connect Base               tailmask @N1
dataset connect Sugar headmask @C3 tailmask @C1
dataset connect Phos  headmask @O3
sequence name MyMol Base Sugar Phos
charge crdset MyMol *
crdout MyMol Nucleotide.ic.charge.mol2