Skip to content

Center of mass binning using grid command #674

Closed

Description

@DDGmichigan

Hi ,
I have a protein in a mixed solvent simulations. My probes are ethanol, acetontrile, imidazole and pyrimidine.
grid command does the per atom binning of atomic densities. However, if I want to perform the center of mass binning rather than the per atom binning, how to modify the code. In simple words " I want to bin the center of mass of molecules rather than bin each atom. Any help will be appreciated. Daniel proposed a way to do this but it is probably not working. Thanks

A sample grid command I use
parm 3kfa_layer_ACN_H2O_5-95vv.prmtop
trajin production.1.crd 1 1250 1
autoimage
#Align trajectory to reference structure by minimizing RMSD
reference /users/dicksmit/gphani/unsabi/users2/gphani/3_mixMD/ablkinase_3KFA/ACN_H2O_5-95vv_layered/setup_solvbox/3kfa_layer_ACN_H2O_5-95vv.pdb
strip :Cl-,Na+
rms reference mass out 3kfa_ACN_10-15ns_md_CA_rmsd.txt :1-286@CA
#Write out grid count of probe occupancy
grid out 3kfa_ACN_10-15ns_C3N_center.xplor 200 0.5 200 0.5 200 0.5 :C3N origin max 0.9
grid out 3kfa_ACN_10-15ns_WAT.xplor 200 0.5 200 0.5 200 0.5 :WAT origin max 0.9

grid out [email protected] 200 0.5 200 0.5 200 0.5 :C3N@C3 origin max 0.9
grid out [email protected] 200 0.5 200 0.5 200 0.5 :C3N@C2 origin max 0.9
grid out [email protected] 200 0.5 200 0.5 200 0.5 :C3N@N1 origin max 0.9
#Correct for systematic error induced by ptraj grid function
translate x -0.25 y -0.25 z -0.25

Activity

  1. drroe commented on Mar 11, 2019

    @drroe
    Contributor

    #681 should address this once it's merged in.

  2. self-assigned this
    on Mar 11, 2019
  3. drroe commented on Mar 11, 2019

    @drroe
    Contributor

    You should now be able to accomplish this via either the byres or bymol keyword.

  4. DDGmichigan commented on Mar 12, 2019

    @DDGmichigan
    Author

    Thanks!
    It did the job I wanted. Thank you Daniel.

  5. DDGmichigan commented on Mar 12, 2019

    @DDGmichigan
    Author

    Hi, I tried compiling the modified codes Action_Grid.cpp, Action_Grid.h, MaskArray.h and MaskArray.cpp.
    I did ./configure -amberlib gnu
    make install

    The version compiles all codes except 1

    CPPTRAJ configuration complete.

    [debarati@fino cpptraj]$ make install
    cd src && make install
    make[1]: Entering directory /users/debarati/cpptraj/src' CXX ActionFrameCounter.cpp CXX ActionList.cpp CXX Action_Align.cpp CXX Action_Angle.cpp CXX Action_AreaPerMol.cpp CXX Action_AtomMap.cpp CXX Action_AtomicCorr.cpp CXX Action_AtomicFluct.cpp CXX Action_AutoImage.cpp CXX Action_Average.cpp CXX Action_Bounds.cpp CXX Action_Box.cpp CXX Action_Center.cpp CXX Action_Channel.cpp CXX Action_CheckChirality.cpp CXX Action_CheckStructure.cpp CXX Action_Closest.cpp CXX Action_ClusterDihedral.cpp CXX Action_Contacts.cpp CXX Action_CreateCrd.cpp CXX Action_CreateReservoir.cpp CXX Action_DNAionTracker.cpp CXX Action_DSSP.cpp CXX Action_Density.cpp CXX Action_Diffusion.cpp CXX Action_Dihedral.cpp CXX Action_Dipole.cpp CXX Action_Distance.cpp CXX Action_DistRmsd.cpp CXX Action_Energy.cpp CXX Action_FilterByData.cpp CXX Action_FixAtomOrder.cpp CXX Action_FixImagedBonds.cpp CXX Action_GIST.cpp CXX Action_Grid.cpp CXX Action_GridFreeEnergy.cpp CXX Action_HydrogenBond.cpp CXX Action_Image.cpp CXX Action_InfraredSpectrum.cpp CXX Action_Jcoupling.cpp CXX Action_LESsplit.cpp CXX Action_LIE.cpp CXX Action_LipidOrder.cpp CXX Action_MakeStructure.cpp CXX Action_Mask.cpp CXX Action_Matrix.cpp CXX Action_MinImage.cpp CXX Action_Molsurf.cpp CXX Action_MultiDihedral.cpp CXX Action_MultiVector.cpp CXX Action_NAstruct.cpp CXX Action_NativeContacts.cpp CXX Action_NMRrst.cpp CXX Action_OrderParameter.cpp CXX Action_Outtraj.cpp CXX Action_PairDist.cpp CXX Action_Pairwise.cpp CXX Action_Principal.cpp CXX Action_Projection.cpp CXX Action_Pucker.cpp CXX Action_Radgyr.cpp CXX Action_Radial.cpp CXX Action_RandomizeIons.cpp CXX Action_Remap.cpp CXX Action_ReplicateCell.cpp CXX Action_Rmsd.cpp CXX Action_Rotate.cpp CXX Action_RunningAvg.cpp CXX Action_STFC_Diffusion.cpp CXX Action_Scale.cpp CXX Action_SetVelocity.cpp CXX Action_Spam.cpp Action_Spam.cpp:285:4: error: invalid preprocessing directive #watidx_ #watidx_.resize( setup.Top().Natom(), -1 ); ^ make[1]: *** [Action_Spam.o] Error 1 make[1]: Leaving directory /users/debarati/cpptraj/src'
    make: *** [install] Error 2
    I did no modifications to Action_SPAM.cpp?

    I do not understand what happened? It worked at first try, I deleted all the folders and freshly modified the scripts and then I get this error!

  6. DDGmichigan commented on Mar 12, 2019

    @DDGmichigan
    Author

    I corrected the mistake this time I get another small bug!
    MaskArray.cpp: In member function ‘int Cpptraj::MaskArray::SetupMasks(const AtomMask&, const Topology&)’:
    MaskArray.cpp:25:64: error: ‘mainMask_’ was not declared in this scope
    for (AtomMask::const_iterator atm = mainMask_.begin(); atm != mainMask_.end(); ++atm)
    ^
    make[1]: *** [MaskArray.o] Error 1
    make[1]: Leaving directory `/users/debarati/cpptraj/src'
    make: *** [install] Error 2

  7. drroe commented on Mar 13, 2019

    @drroe
    Contributor

    Hi, I tried compiling the modified codes Action_Grid.cpp, Action_Grid.h, MaskArray.h and MaskArray.cpp.

    How exactly are you obtaining the modified code? Are you downloading each file separately or are you doing a git pull? The compile errors you are getting seem like some files are missing or corrupted. If there were actual problems with the code the CI testing would have failed.

  8. DDGmichigan commented on Mar 13, 2019

    @DDGmichigan
    Author

    I downloaded each file separately and put them in cpptraj/src
    Then I tried to compile followed by make install

  9. drroe commented on Mar 13, 2019

    @drroe
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions