Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the 'keep' action. Opposite of 'strip'; can also be used to only keep bridging waters from 'hbond' #957

Merged
merged 30 commits into from
Mar 16, 2022

Conversation

drroe
Copy link
Contributor

@drroe drroe commented Mar 16, 2022

Version 6.4.3. Adds a new action, keep.

  [help keep]
	[ bridgedata <bridge data set> [nbridge <#>] [nobridgewarn]
	 [bridgeresname <res name>] bridgeresonly <resrange>] ]
	[keepmask <atoms to keep>]
	[outprefix <prefix>] [nobox] [parmout <filename>]
	[parmopts <comma-separated-list>]
  Keep only specified parts of the system.
    outprefix <prefix> : Write modified topology to <prefix>.<originalname>
    nobox              : If specified, remove box information from topology
    parmout <filename> : Write modified topology to <filename>
    parmopts <list>    : Options for writing topology file

Keep only specified atoms (opposite of strip). This can also be used in conjunction with output from the hbond command to retain solute and only bridging residues (e.g. bridging waters). For example, the following run generates bridging data with the 'hbond' command in a first pass, then uses the bridge ID data to retain only 1 single bridging water between residues 10 and 11:

parm tz2.ortho.parm7
trajin tz2.ortho.nc 
# First pass, generate bridge time series 
hbond hb solventacceptor :WAT@O solventdonor :WAT out hb.dat
run
# Second pass, retain only frames where the bridge is present
# for residues 10 and 11.
keep bridgedata hb[ID] nbridge 1 bridgeresonly 10,11 parmout keep.parm7
# Write trajectory
trajout keep.nc
run

This run reads in bridge ID data from a previous hbond run and uses it to keep only residues 10, 11, and a bridging water:

parm tz2.ortho.parm7
trajin tz2.ortho.nc
readdata hb.dat
keep keepmask :10,11 bridgedata hb.dat:5 nbridge 1 bridgesonly 10,11 \
  parmout keep.10.11.parm7
trajout keep.10.11.nc
run 

Also adds the nobox keyword to closest, fixatomorder, replicatecell, and remap commands.

drroe added 29 commits March 14, 2022 10:34
set was also specified as a bridge residue for command.
@drroe drroe added the New Command New command for cpptraj label Mar 16, 2022
@drroe drroe self-assigned this Mar 16, 2022
@lgtm-com
Copy link

lgtm-com bot commented Mar 16, 2022

This pull request introduces 1 alert when merging b37c7c3 into 1222245 - view on LGTM.com

new alerts:

  • 1 for Wrong type of arguments to formatting function

@drroe drroe merged commit ebce523 into Amber-MD:master Mar 16, 2022
@drroe drroe deleted the hbond.bridge.closest branch March 16, 2022 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new action New Command New command for cpptraj
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant