Skip to content

Commit 3d23849

Browse files
committed
Commiting cleaned original copy of Q from csb to
leave it as an undeveloped old version branch following the same branching as django uses, that is, finished branches are created with: git branch stable/versionnumber and left there but not merged ever into master.
1 parent ffc2861 commit 3d23849

90 files changed

Lines changed: 33114 additions & 134140 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

documentation/manuals/Qman5.tex

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
\usepackage{tabularx} %fixar långa tabeller
1313
\usepackage{multirow} %fixar nested tables
1414
\usepackage{bigstrut}
15+
\usepackage{bibentry}
1516
\newcommand{\dirfig}{./pictures}
1617
%\usepackage{hyperref}
1718
%\usepackage[linkbordercolor=1 1 1]{hyperref}
@@ -51,8 +52,8 @@
5152
\huge{PACKAGE} \Huge{Q}\\
5253

5354
\vspace{0.7cm}
54-
\large{version 5.0\\
55-
January 1, 2004}\\
55+
\large{version 5.06\\
56+
June 27, 2007}\\
5657
\large{Q web site: http://xray.bmc.uu.se/aqwww/Q}
5758
\end{center}
5859

@@ -4264,6 +4265,15 @@ \subsubsection{Building the programs from source code}
42644265
$\sim$/.cshrc).
42654266
\end{enumerate}
42664267

4268+
\section{HOW TO CITE}
4269+
For citing this program please use the following citation:
4270+
4271+
Marelius, J., Kolmodin, K., Feierberg, I. and Åqvist, J. Q: An MD
4272+
program for free energy calculations and empirical valence bond
4273+
simulations in biomolecular systems, J. Mol. Graphics Mod. 1999,
4274+
16, 213-225.
4275+
4276+
42674277
\newpage
42684278

42694279
\begin{thebibliography}{2}

documentation/manuals/qman5.pdf

1.92 KB
Binary file not shown.

src/Makefile.ake

Lines changed: 0 additions & 97 deletions
This file was deleted.

src/README

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
In some machines path to intel fortran (ifort) compiler:
2-
3-
For csh:
1+
Path to ifort compiler:
42
source /home/apps/intel/bin/ifortvars.csh intel64
5-
setenv OMPI_FC ifort
6-
7-
For bash:
8-
source /home/apps/intel/bin/ifortvars.sh intel64
9-
export OMPI_FC ifort
10-
11-
This the same code as glenn with modification on el_scale and qq interactions
12-
3+
setenv OMPI_FC ifort

src/avetr.f90

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
1-
! (C) 2004 Uppsala Molekylmekaniska HB, Uppsala, Sweden
2-
3-
!average co-ordinates from Qdyn trajectory files and write pdb-structure
4-
!Added to Qprep March 2004 by Martin Nervall
5-
!Tested to reproduce average structures from vmd
6-
7-
module AVETR
8-
use PREP
9-
implicit none
10-
11-
integer, parameter :: AVE_PDB = 11
12-
integer(4), private :: ncoords, N_sets = 0
13-
real(4), allocatable, private :: x_in(:), x_sum(:), x2_sum(:)
14-
real(8), private :: rmsd
15-
contains
16-
!TODO: *choose which frames, add more trajectories, divide x_sum every 100 steps
17-
18-
!******************************************************
19-
!Main subroutine
20-
!******************************************************
21-
subroutine avetr_calc
22-
integer :: i, allocation_status
23-
character(len=1) :: ans
24-
logical :: fin
25-
N_sets = 0
26-
call trajectory
27-
ncoords = trj_get_ncoords()
28-
allocate(x_in(ncoords), x_sum(ncoords), x2_sum(ncoords), &
29-
stat=allocation_status)
30-
if (allocation_status .ne. 0) then
31-
write(*,*) 'Out of memory!'
32-
return
33-
end if
34-
do while(trj_read_masked(x_in)) !add from first file
35-
call add_coordinates
36-
end do
37-
38-
!add from multiple files
39-
fin = .false.
40-
do while(.not. fin)
41-
CALL get_string_arg(ans, '-----> Add more frames? (y or n): ')
42-
if (ans .eq. 'y') then
43-
call trajectory
44-
do while(trj_read_masked(x_in)) !add from additional files
45-
call add_coordinates
46-
end do
47-
else
48-
fin = .true.
49-
end if
50-
end do
51-
52-
53-
call average
54-
call write_average
55-
deallocate(x_in, x_sum, x2_sum, stat=allocation_status)
56-
end subroutine avetr_calc
57-
58-
!******************************************************
59-
!Sum the coordinates and the sqared coordinates
60-
!******************************************************
61-
subroutine add_coordinates
62-
x_sum = x_sum + x_in
63-
x2_sum = x2_sum + x_in**2
64-
N_sets = N_sets +1
65-
end subroutine add_coordinates
66-
67-
!******************************************************
68-
!Make average and rmsd
69-
!******************************************************
70-
subroutine average
71-
x_sum = x_sum / N_sets
72-
x2_sum = x2_sum / N_sets
73-
rmsd = sqrt(sum(x2_sum - x_sum**2)/ncoords)
74-
end subroutine average
75-
76-
!******************************************************
77-
!Write average coords to pdb file.
78-
!Variables used from prep: mask
79-
!Variables used from topo: xtop
80-
!******************************************************
81-
subroutine write_average
82-
!assign masked coordinates to right atom in topology
83-
call mask_put(mask, xtop, x_sum)
84-
call writepdb
85-
write(*,'(a,f6.3,a)') 'Root mean square co-ordinate deviation ', rmsd, ' A'
86-
x_sum = 0
87-
x2_sum = 0
88-
end subroutine write_average
89-
90-
end module AVETR
1+
! (C) 2004 Uppsala Molekylmekaniska HB, Uppsala, Sweden
2+
3+
!average co-ordinates from Qdyn trajectory files and write pdb-structure
4+
!Added to Qprep March 2004 by Martin Nervall
5+
!Tested to reproduce average structures from vmd
6+
7+
module AVETR
8+
use PREP
9+
implicit none
10+
11+
integer, parameter :: AVE_PDB = 11
12+
integer(4), private :: ncoords, N_sets = 0
13+
real(4), allocatable, private :: x_in(:), x_sum(:), x2_sum(:)
14+
real(8), private :: rmsd
15+
contains
16+
!TODO: *choose which frames, add more trajectories, divide x_sum every 100 steps
17+
18+
!******************************************************
19+
!Main subroutine
20+
!******************************************************
21+
subroutine avetr_calc
22+
integer :: i, allocation_status
23+
character(len=1) :: ans
24+
logical :: fin
25+
N_sets = 0
26+
call trajectory
27+
ncoords = trj_get_ncoords()
28+
allocate(x_in(ncoords), x_sum(ncoords), x2_sum(ncoords), &
29+
stat=allocation_status)
30+
if (allocation_status .ne. 0) then
31+
write(*,*) 'Out of memory!'
32+
return
33+
end if
34+
do while(trj_read_masked(x_in)) !add from first file
35+
call add_coordinates
36+
end do
37+
38+
!add from multiple files
39+
fin = .false.
40+
do while(fin == .false.)
41+
CALL get_string_arg(ans, '-----> Add more frames? (y or n): ')
42+
if (ans .eq. 'y') then
43+
call trajectory
44+
do while(trj_read_masked(x_in)) !add from additional files
45+
call add_coordinates
46+
end do
47+
else
48+
fin = .true.
49+
end if
50+
end do
51+
52+
53+
call average
54+
call write_average
55+
deallocate(x_in, x_sum, x2_sum, stat=allocation_status)
56+
end subroutine avetr_calc
57+
58+
!******************************************************
59+
!Sum the coordinates and the sqared coordinates
60+
!******************************************************
61+
subroutine add_coordinates
62+
x_sum = x_sum + x_in
63+
x2_sum = x2_sum + x_in**2
64+
N_sets = N_sets +1
65+
end subroutine add_coordinates
66+
67+
!******************************************************
68+
!Make average and rmsd
69+
!******************************************************
70+
subroutine average
71+
x_sum = x_sum / N_sets
72+
x2_sum = x2_sum / N_sets
73+
rmsd = sqrt(sum(x2_sum - x_sum**2)/ncoords)
74+
end subroutine average
75+
76+
!******************************************************
77+
!Write average coords to pdb file.
78+
!Variables used from prep: mask
79+
!Variables used from topo: xtop
80+
!******************************************************
81+
subroutine write_average
82+
!assign masked coordinates to right atom in topology
83+
call mask_put(mask, xtop, x_sum)
84+
call writepdb
85+
write(*,'(a,f6.3,a)') 'Root mean square co-ordinate deviation ', rmsd, ' A'
86+
x_sum = 0
87+
x2_sum = 0
88+
end subroutine write_average
89+
90+
end module AVETR

src/calc_chemscore.f90

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ module CALC_CHEMSCORE
165165
integer, private :: bDoTopcalc ! boolean flag
166166
integer, private :: iRestartCalc=-1 ! flag to indicate if doing calcs on restart file or not
167167

168-
logical, private :: bUseXIN = .false. ! boolean flag to indicate use of xin instead of xtop
168+
integer, private :: bUseXIN = 0 ! boolean flag to indicate use of xin instead of xtop
169169

170170
integer, private :: warn ! flag to indicate if any warnings were displayed
171171

@@ -1212,8 +1212,6 @@ real function angle(a,b,c)
12121212
integer :: a,b,c !parameters
12131213

12141214
real ::ab_sq,bc_sq,ca_sq, scp !local variables
1215-
real, parameter :: pi = 4.0*atan(1.0)
1216-
12171215
ab_sq = distsq(a,b)
12181216
bc_sq = distsq(b,c)
12191217
ca_sq = distsq(c,a)
@@ -1223,7 +1221,7 @@ real function angle(a,b,c)
12231221
if ( scp > 1.0 ) scp = 1.0
12241222
if ( scp < -1.0 ) scp = -1.0
12251223

1226-
angle = acos(scp)*180.0/pi
1224+
angle = acosd(scp)
12271225
end function angle
12281226

12291227
real function dist (a,b)
@@ -1507,4 +1505,4 @@ subroutine score_calc(iCalc, iFrame) ! calc topmost routine
15071505

15081506
end subroutine score_calc
15091507

1510-
end module CALC_CHEMSCORE
1508+
end module CALC_CHEMSCORE

0 commit comments

Comments
 (0)