#include "mypde.h"
#include "mysolv.c"
#include "tsolve.c"
#include "mygrid.c"
Defines | |
#define | COULOM_COEF(TEMP, CHG, RAD, COEF) COEF = 1.67149e+5*CHG/(80*TEMP*RAD) |
#define | len_w 15 |
define a brief formula for analytical calculations. swtich for debug . swtich for analytical calculation . | |
Functions | |
VPUBLIC void | MY_assemR (AM *thee, Bvec *u) |
VPUBLIC void | MY_assem (AM *thee, int evalKey, Bvec *u, Bvec *f, int ip[], double rp[], double energies[], int ekeytol) |
VPUBLIC int | MY_Solve (AM *am, Bvec *u, Bvec *w[], Vlparam *lparam) |
VPUBLIC void | MY_lSolve (AM *thee, Vlparam *lparam) |
VPUBLIC void | MY_write (AM *thee, Vlparam *lparam) |
VPRIVATE void | PDE_readMesh (AM *am, char path[]) |
VPRIVATE Vatom * | Valist_getAtomStorage (Valist *thee, Vatom **plist, int *pnlist, int *pnatoms) |
VPRIVATE int | Valist_setAtomArray (Valist *thee, Vatom **plist, int nlist, int natoms) |
VPUBLIC int | PQR_input (AM *am, Valist *thee, const char *iodev, const char *iofmt, const char *thost, const char *fname) |
Input the PQR file of a molecule. | |
VPUBLIC int | dPMF_input (AM *am, const char *iofil, const char *iofor, const char *thost, const char *filnam) |
VPUBLIC void | dPMF_mapping (AM *am) |
VPUBLIC int | PDE_input (AM *am, Vgrid *grid[], Vlparam *lparam) |
VPUBLIC Vlparam * | lparam_ctor () |
VPUBLIC void | lparam_dtor (Vlparam *thee) |
Variables | |
VPRIVATE Bvec * | w [len_w] |
the number of the temporary vectors for solving Au=f. | |
VPRIVATE int | winuse |
Problem type: time-dependent, Diffusion-reaction Spatial dimension: 2 or 3 Product dimension: 1 Differential operator: Linear or nonlinear potential equation with symmetric or nonsymmetric linear part Boundary conditions: zero or nonzero Dirichlet conditions nonzero or zero Neumann/Robin conditions
Note: Equation for component i is defined as
sum(del(A_ij del(u_j))) = B_i in omega -n dot sum(A_ij del(u_j)) = C_i along natural boundaries
_____ \ ____ ____ \ \ /. A_ij \ / u_j = B_i in omega / \/ \/ /____ j
____ \ ____ \ -n . A_ij \ / u_j = C_i along natural boundaries / \/ /___ j
* * SMOL -- Adaptive Smoluchowski Solver * * Yuhui Cheng (ycheng@mccammon.ucsd.edu) * Dept. of Chemistry and Biochemistry * University of California, San Diego * * Additional contributing authors listed in the code documentation. * * Copyright (c) 2006-2007. University of California, San Diego * All Rights Reserved. * Portions Copyright (c) 1995. Michael Holst. * * This file is part of SMOL. * * SMOL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * SMOL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with SMOL; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * Linking SMOL statically or dynamically with other modules is making a * combined work based on SMOL. Thus, the terms and conditions of the * GNU * General Public License cover the whole combination. * * SPECIAL GPL EXCEPTION * In addition, as a special exception, the copyright holders of SMOL * give you permission to combine the SMOL program with free software * programs and libraries that are released under the GNU LGPL or with * code included in releases of ISIM, Ion Simulator Interface, PMV, * PyMOL * VMD, and Vision. Such combined software may be linked with SMOL * and * redistributed together in original or modified form as mere * aggregation * without requirement that the entire work be under the scope of the * GNU * General Public License. This special exception permission is also * extended * to any software listed in the SPECIAL GPL EXCEPTION clauses by the * FEtk, MC, or MALOC libraries. * * Note that people who make modified versions of SMOL are not obligated * to grant this special exception for their modified versions; it is * their choice whether to do so. The GNU General Public License gives * permission to release a modified version without this exception; this * exception also makes it possible to release a modified version which * carries forward this exception. * *
|
User-provided surface and volume integrals. |
|
*************************************************************************** Routine: MY_lSolve Purpose: Modified linear solver. Author: Jason Suen, followed Michael Holst *************************************************************************** assembly parameters some i/o make sure we have structure setup for assembling either primal or dual problem < forward (primal) problem (linearized about 0) < backward (dual) problem (linearized about 0) initial guess clear the matrix, rhs, residual assemble the stiffness matrix and load vector return with no errors |
|
the subroutine to solve Au=f. method choice (0=slu,1=mg,2=cg,3=bcg,4=bcg,5=bcgstab,6=continuation) primary methods |
|
output control which allows the use to write the vector u(x) in the desired format. format choice (1=GV,2=GMV,3=DX,4=UCD,5=TEC) |
|
Input the PQR file of a molecule.
< PQR file pointer < To hold lines from the PQR file Counters Information to be gleaned from PQR file Make sure we're reading in an ASCII file Open data files Now we read some lines and count the atoms. Check to see if we got an ATOM line Allocate the necessary space for the atom array Rewind the file pointer (use rewind to clear the error indicator, too) Check to see if we got an ATOM line Try to parse a line without chain IDs and with a string residue ID Get pointer to next available atom position Put it in the atom list Have we gotten all the entries? Assign charges and radii to atom vertices |
|
See if we need more space Double the storage space Check the allocation Copy the atoms over Get the next available spot and increment counters
|
|
Copy over data Free old array
|