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

Enhancements and improvements to the 'prepareforleap' command #951

Merged
merged 384 commits into from
Mar 2, 2022

Conversation

drroe
Copy link
Contributor

@drroe drroe commented Mar 1, 2022

Version 6.4.0.

The prepareforleap command has been in cpptraj for a while but has been hidden. It has now progressed enough to where it can be officially released.

The prepareforleap command will prepare a structure (usually from a PDB) for processing with the Amber program LEaP to generate topology and coordinates files for MD simulations. It will handle things like choosing alternate atom locations, removing waters/hydrogen atoms from the structure, renaming residues and generating 'bond' commands for disulfide bonds, change histidine names based on any existing protonation, and (perhaps most importantly) renaming residues/atoms and generating LEaP 'bond' commands for carbohydrates. The command can also call LEaP directly to generate the parameters once the structure is prepared. Although the command is currently Amber/GLYCAM focused, it can be customized via dat/Carbohydrate_PDB_Glycam_Names.txt and keywords for potential use with other force fields. More details are in an upcoming publication.

> help prepareforleap 
	crdset <coords set> [frame <#>] name <out coords set>
	[pdbout <pdbfile> [terbymol]]
	[leapunitname <unit>] [out <leap input file> [runleap <ff file>]]
	[skiperrors]
	[nowat [watermask <watermask>] [noh]
	[keepaltloc {<alt loc ID>|highestocc}]
	[stripmask <stripmask>] [solventresname <solventresname>]
	[molmask <molmask> ...] [determinemolmask <mask>]
	[{nohisdetect |
	  [nd1 <nd1>] [ne2 <ne2] [hisname <his>] [hiename <hie>]
	  [hidname <hid>] [hipname <hip]}]
	[{nodisulfides |
	  existingdisulfides |
	  [cysmask <cysmask>] [disulfidecut <cut>] [newcysname <name>]}]
	[{nosugars |
	  sugarmask <sugarmask> [noc1search] [nosplitres]
	  [resmapfile <file>]
	  [hasglycam] [determinesugarsby {geom|name}]
	 }]

If hydrogen atoms are present in the structure, the command will attempt a simple and straightforward determination of the protonation state of any histidine residues based on where hydrogens are bonded, and assign the appropriate residue name. The command will also identify any existing disulfide bonds as well as potential disulfide bonds and generate the corresponding LEaP ‘bond’ commands which can be applied after the structure is loaded in LEaP. Potential disulfide bonding atoms can be identified via a user-specifiable mask expression.

By default, sugars will have their residue names changed to those compatible with the GLYCAM force field based on their anomer type (alpha/beta), configuration (D/L), and linkages (glycosidic and covalent sugar to non-sugar). Any recognized functional groups that are part of sugar residues (hydroxyl, acetyl, sulfate, etc) will be split into separate residues as required by GLYCAM. If this happens and 'runleap' has not been specified, CPPTRAJ will warn about any residues/atoms that require charge to be adjusted. If 'runleap' has not been specified the command will warn about any atoms that need to have their charges adjusted after LEaP is run.

The command will try to report any potential problems that LEaP might encounter. These include residue names that may be unrecognized (and therefore may not have parameters), mismatches between detected sugar anomer type/configuration and anomer type/configuration based on the sugar residue name, unrecognized sugar linkages, and so on.

For example, the following input prepares PDB 4zzw for processing with PDB, putting the proper leap commands in leap.4zzw.in, writing the prepared PDB to 4zzw.cpptraj.pdb, removing waters and hydrogen atoms, and keeping alternate atom locations with the highest occupancy:

parm 4zzw.pdb
loadcrd 4zzw.pdb name MyCrd
prepareforleap crdset MyCrd name Final out leap.4zzw.in leapunitname m \
  pdbout 4zzw.cpptraj.pdb nowat noh keepaltloc highestocc

drroe added 30 commits October 6, 2021 15:24
@drroe drroe added enhancement New Command New command for cpptraj labels Mar 1, 2022
@drroe drroe self-assigned this Mar 1, 2022
@AmberJenkins
Copy link
Collaborator

The PGI build in Jenkins failed.

@lgtm-com
Copy link

lgtm-com bot commented Mar 1, 2022

This pull request introduces 2 alerts when merging fe5f462 into 8a1543b - view on LGTM.com

new alerts:

  • 2 for FIXME comment

@lgtm-com
Copy link

lgtm-com bot commented Mar 1, 2022

This pull request introduces 2 alerts when merging 820b86e into 8a1543b - view on LGTM.com

new alerts:

  • 2 for FIXME comment

@lgtm-com
Copy link

lgtm-com bot commented Mar 2, 2022

This pull request introduces 1 alert when merging fd1d10e into 8a1543b - view on LGTM.com

new alerts:

  • 1 for Wrong type of arguments to formatting function

@lgtm-com
Copy link

lgtm-com bot commented Mar 2, 2022

This pull request introduces 1 alert when merging 2d76462 into 8a1543b - view on LGTM.com

new alerts:

  • 1 for Wrong type of arguments to formatting function

@drroe drroe merged commit 934adef into Amber-MD:master Mar 2, 2022
@drroe drroe deleted the improve_prepareforleap branch March 2, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New Command New command for cpptraj
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants