Skip to content

Commit

Permalink
Added manpage for bident2 and bident3. Removed bident.f90 from repo. …
Browse files Browse the repository at this point in the history
…Renamed -nframes option, where used, to -frames for consistency with all other codes. Changed default binwidth in bident3 to 0.05 (from 0.01).
  • Loading branch information
trisyoungs committed Mar 15, 2016
1 parent 88c82c5 commit 2f4d8e0
Show file tree
Hide file tree
Showing 10 changed files with 126 additions and 257 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ add_library(external "parse.f90" "dlprw.f90" "utility.f90" "pdensrw.f90" "intege
# Setup binary builds
set (PROGRAMS
"acfcat" "acfprep" "acfsum" "addheader" "angle" "ardf" "avgconfig"
"bident" "bident2" "bident2anal" "bident3" "bident4"
"bident2" "bident2anal" "bident3" "bident4"
"cagecor2" "catdlp" "cdf" "chunkdlp" "cluster" "clusterab" "cn" "counthb" "cryscomp"
"dahist" "dist2" "dlp2dlp" "dlp2dlpflipz" "dlp2dlpshift" "dlp2xyzf" "dlpreorder" "dlpsize"
"editconfig"
Expand Down
3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bin_PROGRAMS = dlp2xyzf catdlp dlp2dlp addheader editconfig dlpfilter his2config his2xyzs dlp2dlpflipz dlp2dlpshift dlpreorder chunkdlp xyz2his
bin_PROGRAMS += cdf dist2 ardf orientrdf rdf rdfsum rdfaa rdfaainter rdfss rdfdep zdens
bin_PROGRAMS += acfcat acfprep acfsum angle cagecor2 cn counthb geom getcell intertorsion intratorsion intratorsion2 lifehb moldist msd msd2 vac vac2
bin_PROGRAMS += bident bident2 bident2anal bident3 bident4 cluster clusterab cryscomp dahist legendre ringconf zangle
bin_PROGRAMS += bident2 bident2anal bident3 bident4 cluster clusterab cryscomp dahist legendre ringconf zangle
bin_PROGRAMS += glucanal glucgeom gluchb gluchbeach
bin_PROGRAMS += pdens pdensinfo pdensint pdensmirror pdenstrim pdensgauss
bin_PROGRAMS += avgconfig dlpsize genlb gengg pairs probedlp
Expand Down Expand Up @@ -94,7 +94,6 @@ vac_SOURCES = ${PARSE} ${DLPRW} ${UTILITY} vac.f90
vac2_SOURCES = ${PARSE} ${DLPRW} ${UTILITY} vac2.f90

# Analyse 2
bident_SOURCES = ${PARSE} ${DLPRW} ${UTILITY} bident.f90
bident2_SOURCES = ${PARSE} ${DLPRW} ${UTILITY} bident2.f90
bident2anal_SOURCES = ${PARSE} ${DLPRW} ${UTILITY} bident2anal.f90
bident3_SOURCES = ${PARSE} ${DLPRW} ${UTILITY} bident3.f90
Expand Down
4 changes: 2 additions & 2 deletions avgconfig.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ program avgconfig
nargs = iargc()
if (nargs.LT.2) then
write(*,"(a)") "Usage: avgconfig <HISTORYfile> <OUTPUTfile> [-options]"
write(*,"(a)") " [-nframes n] Number of frames to do"
write(*,"(a)") " [-frames n] Number of frames to do"
stop
else
call getarg(1,hisfile)
Expand Down Expand Up @@ -57,7 +57,7 @@ program avgconfig
n = n + 1; if (n.GT.nargs) exit
call getarg(n,temp)
select case (temp)
case ("-nframes")
case ("-frames")
n = n + 1; call getarg(n,temp); read(temp,"(I6)") maxframes
write(0,"(A,I1)") "Frames to do is", maxframes
case default
Expand Down
246 changes: 0 additions & 246 deletions bident.f90

This file was deleted.

2 changes: 1 addition & 1 deletion bident2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ program bident2
nargs = iargc()
if (nargs.lt.7) then
write(0,"(a120)") "Usage : bident2 <HISTORYfile> <OUTfile> <sp1 (central)> <sp2 (outer)> <sp2 atom i> <sp2 atom j> <maxdist>"
write(0,"(a80)") " [-nframes n] [-discard n] [-site a b (e.g. H-O)] [-dump]"
write(0,"(a80)") " [-frames n] [-discard n] [-site a b (e.g. H-O)] [-dump]"
stop
end if
call getarg(1,hisfile)
Expand Down
4 changes: 2 additions & 2 deletions bident3.f90
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ program bident3
real*8, allocatable :: singlehist(:,:), bifurhist(:,:), bridgehist(:,:), bihist(:,:)
real*8, allocatable :: singlemap(:,:,:), bifurmap(:,:,:), bridgemap(:,:,:), bimap(:,:,:)

binwidth=0.01 ! In Angstroms
binwidth=0.05 ! In Angstroms

nargs = iargc()
if (nargs.lt.7) then
write(0,"(a120)") "Usage : bident3 <HISTORYfile> <OUTfile> <sp1 (central)> <sp2 (outer)> <sp2 atom i> <sp2 atom j> <maxdist>"
write(0,"(a80)") " [-nframes n] [-discard n] [-site a b (e.g. H-O)] [-dump] [-bin width]"
write(0,"(a80)") " [-frames n] [-discard n] [-site a b (e.g. H-O)] [-dump] [-bin width]"
stop
end if
call getarg(1,hisfile)
Expand Down
2 changes: 1 addition & 1 deletion bident4.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ program bident4
nargs = iargc()
if (nargs.lt.6) then
write(0,"(a120)") "Usage : bident4 <HISTORYfile> <OUTfile> <sp1> <sp1 atom i> <sp1 atom j>"
write(0,"(a80)") " [-nframes n] [-discard n] [-site sp2 a b maxdist (e.g. H(a)-O(b))] [-maxpatterns n]"
write(0,"(a80)") " [-frames n] [-discard n] [-site sp2 a b maxdist (e.g. H(a)-O(b))] [-maxpatterns n]"
write(0,"(a80)") " [-grid n] [-delta d] [-maxatomcontacts n] [-maxmolcontacts n]"
write(0,"(a80)") " [-calc3d x1 x2 y1 y2] [-writeone] [-writecontact sp]"
stop
Expand Down
55 changes: 55 additions & 0 deletions doc/99.utilities/bident2/bident2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: bident2
brief: Calculate contact types between sites on different molecules
taxonomy:
category: docs
docroot: /dlputils/docs
template: manpage
---

**bident2** calculates contact types (e.g. monodentate, bidentate etc.) between defined sites on two species. It came about initially because of the need to analyse simulations comprising acetate anions (hence the 'bident'-ate name of the program) where the type of binding between the acetate and acidis hydrogen sites on a second species was unknown. Because of this the code is quite specific, but can be 'abused' to analyse contact numbers for systems where the primary interaction site is not potentially bidentate.

The code analyses all contacts less than a specified distance, grouping them into monodentate (where an 'H' site is within range of one of the two sites of the second species), bidentate (where an 'H' site is within range of both sites of the second species), bridging (where two 'H' sites are bridged by the second species, one contact for each of its sites), bifurcated (where one 'H' site has a contact with both sites of the second species simultaneously), and multiple (which encompasses all other cases that are not so easy to interpret or name).

The initial intention of **bident2** was to analyse hydrogen bonding contacts between acidic H sites of a cation and the bidentate oxygen moeity of an anion, but as already stated the code can be lightly 'abused'. Firstly, there is no need for the two sites on the second species to be situated such that, together, they might be considered a potentially 'bidentate' binding site. The program will run just fine, but of course no bidentate (or likely any other multi-contact interactions) will be found, but the single contacts will be caught. In this way **bident2** can be used as a probe for contact numbers between individual binding sites.

## Related Programs
+ To calculate contact distributions and output distance / angle maps, see [**bident3**](/dlputils/docs/bident3).

## Basic Usage

```
bident2 <HISTORYfile> <OUTPUTfile> <sp1> <sp2> <i> <j> <maxdist> [-frames n] [-discard n] [-site a b] [-dump]
```

Where:
`<HISTORYfile>` is the name of the DL_POLY HISTORY file
`<OUTPUTfile>` is the name of the DL_POLY OUTPUT file
`<sp1>` is the integer index of the species possessing the target 'H' atom sites
`<sp2>` is the integer index of the species possessing the 'bidentate' interaction sites
`<i>` is the integer index of the first atom of the bidentate binding site on species 2
`<j>` is the integer index of the second atom of the bidentate binding site on species 2
`<maxdist>` is the maximum allowable distance between sites on the two species

Although this is enough to run **bident2**, at least one 'H' site on species 1 must be defined with the `-site` option.

## Switches

`-discard` _n_
Skip _n_ frames at the beginning of the trajectory before starting the calculation (default = 0)

`-dump`
Print lots of individual contact information to a dump file.

`-frames` _n_
Stop calculating after processing _n_ frames (default = all frames)

`-site` _a_ _b_
Add a site a-b on species 1, where _a_ and _b_ are the local integer indices of the atoms. _a_ represents the 'H'-type atom, and _b_ its bound neighbour. Multiple sites may be defined at once, and will be considered separately in the output.

## Output <a id="output"></a>

Given an input HISTORY file `results.HISu`, then output files are as follows:
`results.bidentNNMM` : all contact information for the defined sites between species NN and MM

This outout file lists each defined `-site` in its own column, detailing the total number of contacts found (regardless of their style) for each, followed by a breakdown of the individual contact styles by number and percentages of group and total contact numbers.
Loading

0 comments on commit 2f4d8e0

Please sign in to comment.