mirror of
https://github.com/Discngine/fpocket.git
synced 2026-06-04 20:04:22 +08:00
Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
251065b939 | ||
|
|
4f54a742c2 | ||
|
|
6c5db32fdd | ||
|
|
9f2f379997 | ||
|
|
6e66d3677c | ||
|
|
146f76e8f8 | ||
|
|
f792bff126 | ||
|
|
d42000c72f | ||
|
|
a9eb68e8b9 | ||
|
|
16e7070daa | ||
|
|
b40990afb5 | ||
|
|
2bfce34457 | ||
|
|
6d7e84677b | ||
|
|
1e861b184b | ||
|
|
4b3073e0de | ||
|
|
675fe8c037 | ||
|
|
beb472ba2b | ||
|
|
c87362fa04 | ||
|
|
9ff11f655f | ||
|
|
11cff11a1e | ||
|
|
a206c797a4 | ||
|
|
79e16f8b15 | ||
|
|
96a6ed30ed | ||
|
|
5967a8fb8c | ||
|
|
57989435b4 | ||
|
|
9f7e173a2d | ||
|
|
6463aee064 | ||
|
|
e3347e6259 | ||
|
|
fc1dac6633 | ||
|
|
73e911ab58 | ||
|
|
ff92eafeb7 | ||
|
|
4f4893164f | ||
|
|
b02ae9ac19 | ||
|
|
87cea6b1ce | ||
|
|
b410ea1a6a | ||
|
|
09bb933615 | ||
|
|
1d186a45c9 | ||
|
|
5614b44600 | ||
|
|
0a150455e0 | ||
|
|
e571f00051 |
4
.github/workflows/c-cpp.yml
vendored
4
.github/workflows/c-cpp.yml
vendored
@@ -15,10 +15,10 @@ jobs:
|
||||
run: sudo apt-get install libnetcdf-dev
|
||||
- name: make
|
||||
run: make fpocket
|
||||
- name: Set up Python 3.7
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
python-version: 3.12
|
||||
- name: create conda environment
|
||||
run: conda env update -f ./tests/environment.yml
|
||||
- name : activate
|
||||
|
||||
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM debian:bookworm-slim
|
||||
RUN groupadd -r fpocket && useradd --no-log-init -r -g fpocket fpocket
|
||||
RUN apt update -y && apt install -y gcc g++ make libnetcdf-dev && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# all of this mess is essentially to have a minimalistic build at the end
|
||||
COPY makefile /opt/fpocket/
|
||||
COPY src /opt/fpocket/src
|
||||
COPY man /opt/fpocket/man
|
||||
COPY headers /opt/fpocket/headers
|
||||
COPY obj /opt/fpocket/obj
|
||||
COPY scripts /opt/fpocket/scripts
|
||||
COPY bin /opt/fpocket/bin
|
||||
COPY plugins/LINUXAMD64 /opt/fpocket/plugins/LINUXAMD64
|
||||
COPY plugins/include /opt/fpocket/plugins/include
|
||||
COPY plugins/noarch /opt/fpocket/plugins/noarch
|
||||
|
||||
WORKDIR /opt/fpocket
|
||||
|
||||
RUN make && make install && make clean
|
||||
USER fpocket
|
||||
WORKDIR /tmp
|
||||
CMD ["fpocket"]
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM debian:bullseye-slim
|
||||
FROM debian:bookworm-slim
|
||||
RUN groupadd -r fpocket && useradd --no-log-init -r -g fpocket fpocket
|
||||
RUN apt update -y && apt install -y gcc g++ make libnetcdf-dev && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ docker build -t fpocket/fpocket .
|
||||
This will build fpocket into your local fpocket/fpocket image. You can then run fpocket/mdpocket etc using:
|
||||
|
||||
```bash
|
||||
docker run -v `pwd`:/WORKDIR fpocket/fpocket fpocket -f data/sample/1UYD.pdb
|
||||
docker run -v `pwd`:/workdir fpocket/fpocket fpocket -f /workdir/yourfile.pdb
|
||||
```
|
||||
|
||||
Here you mount your current directory with your input files into the preconfigured `/WORKDIR` in the docker container and then run fpocket on a file in that mounted folder.
|
||||
Here you mount your current directory with your input files into the preconfigured `/workdir` in the docker container and then run fpocket on a file in that mounted folder. Make sure that the folder is writeable to others if you run it through docker.
|
||||
|
||||
### Installing
|
||||
|
||||
@@ -107,6 +107,11 @@ make ARCH=MACOSXX86_64
|
||||
sudo make install
|
||||
```
|
||||
|
||||
For M1 and M2, use the MACOSXARM64 architecture:
|
||||
```
|
||||
ARCH=MACOSXARM64 make
|
||||
```
|
||||
|
||||
#### Using conda
|
||||
|
||||
There's also a conda package of fpocket available thanks to Simon Bray. You can install fpocket using conda with:
|
||||
|
||||
9565
data/sample/123abc.cif
Normal file
9565
data/sample/123abc.cif
Normal file
File diff suppressed because it is too large
Load Diff
7412
data/sample/4gfo.cif
Normal file
7412
data/sample/4gfo.cif
Normal file
File diff suppressed because it is too large
Load Diff
7824
data/sample/4gfo_customized.cif
Normal file
7824
data/sample/4gfo_customized.cif
Normal file
File diff suppressed because it is too large
Load Diff
10785
data/sample/6a5k.cif
Normal file
10785
data/sample/6a5k.cif
Normal file
File diff suppressed because it is too large
Load Diff
13962
data/sample/7z9t.cif
Normal file
13962
data/sample/7z9t.cif
Normal file
File diff suppressed because it is too large
Load Diff
@@ -37,12 +37,14 @@ typedef struct s_atm
|
||||
char name[5], /**< Atom name */
|
||||
type[7], /**< Atom type */
|
||||
chain[16], /**< Chain name */
|
||||
label_asym_id[16],
|
||||
symbol[3], /**< Chemical symbol of the atom */
|
||||
res_name[8]; /**< Atom residue name */
|
||||
|
||||
int id, /**< Atom id */
|
||||
seen, /**< Say if we have seen this atom during a neighbor search */
|
||||
res_id, /**< Atom residue ID */
|
||||
label_seq_id, /**<MMCIF label seq ID*/
|
||||
atype,
|
||||
charge, /**< Atom charge */
|
||||
abpa; /**< 1 if atom is an abpa, 0 otherwise*/
|
||||
|
||||
@@ -55,6 +55,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
#define M_DB_RUN 0 /**< default value for running fpocket for populating a database, 0 default*/
|
||||
|
||||
#define M_MAX_CHAINS_DELETE 20
|
||||
#define M_MAX_CHAIN_NAME_LENGTH 20
|
||||
#define M_MAX_LIG_RESNAME_LENGTH 20
|
||||
|
||||
#define M_MIN_AS_DENSITY 0.7
|
||||
|
||||
@@ -121,7 +123,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
#define M_PAR_CHAIN_AS_LIGAND 'a' /**flag, to define which chains are defined as a ligand*/
|
||||
#define M_PAR_CHAIN_AS_LIGAND_LONG "chain_as_ligand"
|
||||
|
||||
#define M_PAR_WRITE_MODE 'w' /**flag, to define which chains are defined as a ligand*/
|
||||
#define M_PAR_WRITE_MODE 'w' /**flag, to define write mode for pocket output: d->same as input, b or both -> both (pdb & cif), p or pdb ->pdb, m or cif -> mmcif*/
|
||||
#define M_PAR_WRITE_MODE_LONG "write_mode"
|
||||
|
||||
#define M_PAR_MIN_N_EXPLICIT_POCKET 'u'
|
||||
@@ -184,8 +186,8 @@ typedef struct s_fparams
|
||||
char custom_ligand[M_MAX_PDB_NAME_LEN]; /**container for custom pocket detection using a particular ligand*/
|
||||
char custom_pocket_arg[M_MAX_CUSTOM_POCKET_LEN];
|
||||
char **pdb_lst;
|
||||
char xlig_chain_code[3];
|
||||
char xlig_resname[3];
|
||||
char *xlig_chain_code;
|
||||
char *xlig_resname;
|
||||
int xlig_resnumber;
|
||||
int xpocket_n; /**number of residues defining the pocket to consider*/
|
||||
char *xpocket_chain_code;
|
||||
@@ -204,7 +206,8 @@ typedef struct s_fparams
|
||||
to be an apolar a-sphere */
|
||||
nb_mcv_iter, /**< Number of iteration for the Monte Carlo volume
|
||||
calculation */
|
||||
basic_volume_div, /**< Box division factor for basic volume calculation */
|
||||
basic_volume_div; /**< Box division factor for basic volume calculation */
|
||||
unsigned short
|
||||
min_pock_nb_asph; /**< Minimump number of alpha spheres per pocket */
|
||||
|
||||
float clust_max_dist, /**< First clustering distance criteria */
|
||||
@@ -214,8 +217,10 @@ typedef struct s_fparams
|
||||
asph_min_size, /**< Minimum size of alpha spheres to keep */
|
||||
min_as_density, /**<Minimum alpha sphere density for a pocket to be retained*/
|
||||
asph_max_size; /**< Maximum size of alpha spheres to keep */
|
||||
char chain_delete[M_MAX_CHAINS_DELETE]; /*chosen chain to delete before calculation*/
|
||||
char chain_as_ligand[M_MAX_CHAINS_DELETE];
|
||||
char *chain_delete[M_MAX_CHAINS_DELETE]; /*chosen chain to delete before calculation*/
|
||||
unsigned short n_chains_to_delete;
|
||||
unsigned short n_chains_as_ligand;
|
||||
char *chain_as_ligand[M_MAX_CHAINS_DELETE];
|
||||
int chain_is_kept; /* To choose if we keep the chains or not*/
|
||||
char write_par[10]; /*write mode : d -> default | b -> both pdb and mmcif | p ->pdb | m -> mmcif*/
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
/* --------------------------PROTOTYPES---------------------------------------*/
|
||||
|
||||
void refinePockets(c_lst_pockets *pockets, s_fparams *params);
|
||||
void apply_clustering(c_lst_pockets *pockets, s_fparams *params);
|
||||
void apply_clustering(c_lst_pockets *pockets);
|
||||
void reIndexPockets(c_lst_pockets *pockets);
|
||||
void dropSmallNpolarPockets(c_lst_pockets *pockets, s_fparams *params);
|
||||
void drop_tiny(c_lst_pockets *pockets, s_fparams *params) ;
|
||||
|
||||
@@ -146,6 +146,6 @@ void fill_coord_grid(s_pdb *pdb);
|
||||
|
||||
|
||||
short get_mm_type_from_element(char *symbol);
|
||||
int chains_to_delete(char *chains_selected, char current_line_chain, int is_chain_kept);
|
||||
int is_ligand(char *chains_selected, char current_line_chain);
|
||||
int chains_to_delete(char *chains_selected[20], char *current_line_chain, int is_chain_kept,unsigned short n_chains_to_delete);
|
||||
int is_ligand(char *chains_selected[20], char *current_line_chain, unsigned short n_chains_as_ligand);
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
|
||||
/* ------------------------------- PUBLIC MACROS ---------------------------- */
|
||||
|
||||
#define M_MAX_PDB_NAME_LEN 200 /**< maximum pdb filename length*/
|
||||
#define M_MAX_PDB_NAME_LEN 2000 /**< maximum pdb filename length*/
|
||||
#define M_MAX_CUSTOM_POCKET_LEN 8000 /** maximum length for a custom pocket string*/
|
||||
#define M_SIGN 1
|
||||
#define M_NO_SIGN 0
|
||||
|
||||
@@ -28,6 +28,6 @@ void write_pqr_atom_line(FILE *f, const char *rec_name, int id, const char *atom
|
||||
|
||||
void write_mmcif_atom_line(FILE *f, const char rec_name[], int id, const char atom_name[],
|
||||
char alt_loc, const char res_name[], const char chain[],
|
||||
int res_id, const char insert, float x, float y, float z, float occ,
|
||||
int res_id, const char label_asym_id[],int label_seq_id, const char insert, float x, float y, float z, float occ,
|
||||
float bfactor, int abpa, const char *symbol, int charge,float abpa_prob) ;
|
||||
#endif
|
||||
|
||||
@@ -40,6 +40,7 @@ void write_pdb_atoms(FILE *f, s_atm *atoms, int natoms) ;
|
||||
void write_each_pocket_for_DB(const char out_path[], c_lst_pockets *pockets,s_pdb *pdb);
|
||||
void write_pocket_pqr_DB(const char out[], s_pocket *pocket);
|
||||
void write_pocket_pdb_DB(const char out[], s_pocket *pocket,s_pdb *pdb);
|
||||
void write_pocket_mmcif_DB(const char out[], s_pocket *pocket, s_pdb *pdb);
|
||||
|
||||
void write_mmcif_atoms(FILE *f, s_atm *atoms, int natoms);
|
||||
void write_pockets_single_mmcif(const char out[], s_pdb *pdb, c_lst_pockets *pockets);
|
||||
|
||||
4
makefile
4
makefile
@@ -1,7 +1,7 @@
|
||||
#------------------------------------------------------------
|
||||
# Makefile.
|
||||
#------------------------------------------------------------
|
||||
#ARCH = MACOSXX86_64
|
||||
# ARCH = MACOSXX86_64
|
||||
ARCH = LINUXAMD64
|
||||
export ARCH
|
||||
|
||||
@@ -47,7 +47,7 @@ COS = -DM_OS_LINUX
|
||||
CDEBUG = -DMNO_MEM_DEBUG
|
||||
CWARN = -W -Wextra -Wwrite-strings -Wstrict-prototypes
|
||||
|
||||
CFLAGS = $(CWARN) $(COS) $(CDEBUG) -O2 -g -pg -std=c99 -I$(PLUGINDIR)/include -I$(PLUGINDIR)/$(ARCH)/molfile
|
||||
CFLAGS = $(CWARN) $(COS) $(CDEBUG) -O2 -g -pg -std=gnu99 -I$(PLUGINDIR)/include -I$(PLUGINDIR)/$(ARCH)/molfile
|
||||
QCFLAGS = -O -g -pg -ansi
|
||||
|
||||
LGSL = -L$(PATH_GSL)lib -lgsl -lgslcblas
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/abinitplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/abinitplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/amiraplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/amiraplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/avsplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/avsplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/babelplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/babelplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/basissetplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/basissetplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/bgfplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/bgfplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/binposplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/binposplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/biomoccaplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/biomoccaplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/brixplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/brixplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/carplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/carplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/ccp4plugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/ccp4plugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/corplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/corplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/cpmdplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/cpmdplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/crdplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/crdplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/cubeplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/cubeplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/dcdplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/dcdplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/dlpolyplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/dlpolyplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/dsn6plugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/dsn6plugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/dtrplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/dtrplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/dxplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/dxplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/edmplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/edmplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/fs4plugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/fs4plugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/gamessplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/gamessplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/graspplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/graspplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/grdplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/grdplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/gridplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/gridplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/gromacsplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/gromacsplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/jsplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/jsplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/lammpsplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/lammpsplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/libmolfile_plugin.a
Normal file
BIN
plugins/MACOSXARM64/molfile/libmolfile_plugin.a
Normal file
Binary file not shown.
415
plugins/MACOSXARM64/molfile/libmolfile_plugin.h
Normal file
415
plugins/MACOSXARM64/molfile/libmolfile_plugin.h
Normal file
@@ -0,0 +1,415 @@
|
||||
#ifndef LIBMOLFILE_PLUGIN_H
|
||||
#define LIBMOLFILE_PLUGIN_H
|
||||
#include "vmdplugin.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int molfile_abinitplugin_init(void);
|
||||
extern int molfile_abinitplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_abinitplugin_fini(void);
|
||||
extern int molfile_amiraplugin_init(void);
|
||||
extern int molfile_amiraplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_amiraplugin_fini(void);
|
||||
extern int molfile_avsplugin_init(void);
|
||||
extern int molfile_avsplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_avsplugin_fini(void);
|
||||
extern int molfile_babelplugin_init(void);
|
||||
extern int molfile_babelplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_babelplugin_fini(void);
|
||||
extern int molfile_basissetplugin_init(void);
|
||||
extern int molfile_basissetplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_basissetplugin_fini(void);
|
||||
extern int molfile_bgfplugin_init(void);
|
||||
extern int molfile_bgfplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_bgfplugin_fini(void);
|
||||
extern int molfile_binposplugin_init(void);
|
||||
extern int molfile_binposplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_binposplugin_fini(void);
|
||||
extern int molfile_biomoccaplugin_init(void);
|
||||
extern int molfile_biomoccaplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_biomoccaplugin_fini(void);
|
||||
extern int molfile_brixplugin_init(void);
|
||||
extern int molfile_brixplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_brixplugin_fini(void);
|
||||
extern int molfile_carplugin_init(void);
|
||||
extern int molfile_carplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_carplugin_fini(void);
|
||||
extern int molfile_ccp4plugin_init(void);
|
||||
extern int molfile_ccp4plugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_ccp4plugin_fini(void);
|
||||
extern int molfile_corplugin_init(void);
|
||||
extern int molfile_corplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_corplugin_fini(void);
|
||||
extern int molfile_cpmdplugin_init(void);
|
||||
extern int molfile_cpmdplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_cpmdplugin_fini(void);
|
||||
extern int molfile_crdplugin_init(void);
|
||||
extern int molfile_crdplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_crdplugin_fini(void);
|
||||
extern int molfile_cubeplugin_init(void);
|
||||
extern int molfile_cubeplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_cubeplugin_fini(void);
|
||||
extern int molfile_dcdplugin_init(void);
|
||||
extern int molfile_dcdplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_dcdplugin_fini(void);
|
||||
extern int molfile_dlpolyplugin_init(void);
|
||||
extern int molfile_dlpolyplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_dlpolyplugin_fini(void);
|
||||
extern int molfile_dsn6plugin_init(void);
|
||||
extern int molfile_dsn6plugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_dsn6plugin_fini(void);
|
||||
extern int molfile_dxplugin_init(void);
|
||||
extern int molfile_dxplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_dxplugin_fini(void);
|
||||
extern int molfile_edmplugin_init(void);
|
||||
extern int molfile_edmplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_edmplugin_fini(void);
|
||||
extern int molfile_fs4plugin_init(void);
|
||||
extern int molfile_fs4plugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_fs4plugin_fini(void);
|
||||
extern int molfile_gamessplugin_init(void);
|
||||
extern int molfile_gamessplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_gamessplugin_fini(void);
|
||||
extern int molfile_graspplugin_init(void);
|
||||
extern int molfile_graspplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_graspplugin_fini(void);
|
||||
extern int molfile_grdplugin_init(void);
|
||||
extern int molfile_grdplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_grdplugin_fini(void);
|
||||
extern int molfile_gridplugin_init(void);
|
||||
extern int molfile_gridplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_gridplugin_fini(void);
|
||||
extern int molfile_gromacsplugin_init(void);
|
||||
extern int molfile_gromacsplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_gromacsplugin_fini(void);
|
||||
extern int molfile_jsplugin_init(void);
|
||||
extern int molfile_jsplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_jsplugin_fini(void);
|
||||
extern int molfile_lammpsplugin_init(void);
|
||||
extern int molfile_lammpsplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_lammpsplugin_fini(void);
|
||||
extern int molfile_mapplugin_init(void);
|
||||
extern int molfile_mapplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_mapplugin_fini(void);
|
||||
extern int molfile_mdfplugin_init(void);
|
||||
extern int molfile_mdfplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_mdfplugin_fini(void);
|
||||
extern int molfile_mol2plugin_init(void);
|
||||
extern int molfile_mol2plugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_mol2plugin_fini(void);
|
||||
extern int molfile_moldenplugin_init(void);
|
||||
extern int molfile_moldenplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_moldenplugin_fini(void);
|
||||
extern int molfile_molemeshplugin_init(void);
|
||||
extern int molfile_molemeshplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_molemeshplugin_fini(void);
|
||||
extern int molfile_msmsplugin_init(void);
|
||||
extern int molfile_msmsplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_msmsplugin_fini(void);
|
||||
extern int molfile_namdbinplugin_init(void);
|
||||
extern int molfile_namdbinplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_namdbinplugin_fini(void);
|
||||
extern int molfile_offplugin_init(void);
|
||||
extern int molfile_offplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_offplugin_fini(void);
|
||||
extern int molfile_parm7plugin_init(void);
|
||||
extern int molfile_parm7plugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_parm7plugin_fini(void);
|
||||
extern int molfile_parmplugin_init(void);
|
||||
extern int molfile_parmplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_parmplugin_fini(void);
|
||||
extern int molfile_pbeqplugin_init(void);
|
||||
extern int molfile_pbeqplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_pbeqplugin_fini(void);
|
||||
extern int molfile_pdbplugin_init(void);
|
||||
extern int molfile_pdbplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_pdbplugin_fini(void);
|
||||
extern int molfile_pdbxplugin_init(void);
|
||||
extern int molfile_pdbxplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_pdbxplugin_fini(void);
|
||||
extern int molfile_phiplugin_init(void);
|
||||
extern int molfile_phiplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_phiplugin_fini(void);
|
||||
extern int molfile_pltplugin_init(void);
|
||||
extern int molfile_pltplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_pltplugin_fini(void);
|
||||
extern int molfile_plyplugin_init(void);
|
||||
extern int molfile_plyplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_plyplugin_fini(void);
|
||||
extern int molfile_pqrplugin_init(void);
|
||||
extern int molfile_pqrplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_pqrplugin_fini(void);
|
||||
extern int molfile_psfplugin_init(void);
|
||||
extern int molfile_psfplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_psfplugin_fini(void);
|
||||
extern int molfile_raster3dplugin_init(void);
|
||||
extern int molfile_raster3dplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_raster3dplugin_fini(void);
|
||||
extern int molfile_rst7plugin_init(void);
|
||||
extern int molfile_rst7plugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_rst7plugin_fini(void);
|
||||
extern int molfile_situsplugin_init(void);
|
||||
extern int molfile_situsplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_situsplugin_fini(void);
|
||||
extern int molfile_spiderplugin_init(void);
|
||||
extern int molfile_spiderplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_spiderplugin_fini(void);
|
||||
extern int molfile_stlplugin_init(void);
|
||||
extern int molfile_stlplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_stlplugin_fini(void);
|
||||
extern int molfile_tinkerplugin_init(void);
|
||||
extern int molfile_tinkerplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_tinkerplugin_fini(void);
|
||||
extern int molfile_uhbdplugin_init(void);
|
||||
extern int molfile_uhbdplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_uhbdplugin_fini(void);
|
||||
extern int molfile_vaspchgcarplugin_init(void);
|
||||
extern int molfile_vaspchgcarplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vaspchgcarplugin_fini(void);
|
||||
extern int molfile_vaspoutcarplugin_init(void);
|
||||
extern int molfile_vaspoutcarplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vaspoutcarplugin_fini(void);
|
||||
extern int molfile_vaspparchgplugin_init(void);
|
||||
extern int molfile_vaspparchgplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vaspparchgplugin_fini(void);
|
||||
extern int molfile_vaspposcarplugin_init(void);
|
||||
extern int molfile_vaspposcarplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vaspposcarplugin_fini(void);
|
||||
extern int molfile_vasp5xdatcarplugin_init(void);
|
||||
extern int molfile_vasp5xdatcarplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vasp5xdatcarplugin_fini(void);
|
||||
extern int molfile_vaspxdatcarplugin_init(void);
|
||||
extern int molfile_vaspxdatcarplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vaspxdatcarplugin_fini(void);
|
||||
extern int molfile_vaspxmlplugin_init(void);
|
||||
extern int molfile_vaspxmlplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vaspxmlplugin_fini(void);
|
||||
extern int molfile_vtkplugin_init(void);
|
||||
extern int molfile_vtkplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_vtkplugin_fini(void);
|
||||
extern int molfile_xbgfplugin_init(void);
|
||||
extern int molfile_xbgfplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_xbgfplugin_fini(void);
|
||||
extern int molfile_xsfplugin_init(void);
|
||||
extern int molfile_xsfplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_xsfplugin_fini(void);
|
||||
extern int molfile_xyzplugin_init(void);
|
||||
extern int molfile_xyzplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_xyzplugin_fini(void);
|
||||
extern int molfile_dtrplugin_init(void);
|
||||
extern int molfile_dtrplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_dtrplugin_fini(void);
|
||||
extern int molfile_maeffplugin_init(void);
|
||||
extern int molfile_maeffplugin_register(void *, vmdplugin_register_cb);
|
||||
extern int molfile_maeffplugin_fini(void);
|
||||
|
||||
#define MOLFILE_INIT_ALL \
|
||||
molfile_abinitplugin_init(); \
|
||||
molfile_amiraplugin_init(); \
|
||||
molfile_avsplugin_init(); \
|
||||
molfile_babelplugin_init(); \
|
||||
molfile_basissetplugin_init(); \
|
||||
molfile_bgfplugin_init(); \
|
||||
molfile_binposplugin_init(); \
|
||||
molfile_biomoccaplugin_init(); \
|
||||
molfile_brixplugin_init(); \
|
||||
molfile_carplugin_init(); \
|
||||
molfile_ccp4plugin_init(); \
|
||||
molfile_corplugin_init(); \
|
||||
molfile_cpmdplugin_init(); \
|
||||
molfile_crdplugin_init(); \
|
||||
molfile_cubeplugin_init(); \
|
||||
molfile_dcdplugin_init(); \
|
||||
molfile_dlpolyplugin_init(); \
|
||||
molfile_dsn6plugin_init(); \
|
||||
molfile_dxplugin_init(); \
|
||||
molfile_edmplugin_init(); \
|
||||
molfile_fs4plugin_init(); \
|
||||
molfile_gamessplugin_init(); \
|
||||
molfile_graspplugin_init(); \
|
||||
molfile_grdplugin_init(); \
|
||||
molfile_gridplugin_init(); \
|
||||
molfile_gromacsplugin_init(); \
|
||||
molfile_jsplugin_init(); \
|
||||
molfile_lammpsplugin_init(); \
|
||||
molfile_mapplugin_init(); \
|
||||
molfile_mdfplugin_init(); \
|
||||
molfile_mol2plugin_init(); \
|
||||
molfile_moldenplugin_init(); \
|
||||
molfile_molemeshplugin_init(); \
|
||||
molfile_msmsplugin_init(); \
|
||||
molfile_namdbinplugin_init(); \
|
||||
molfile_offplugin_init(); \
|
||||
molfile_parm7plugin_init(); \
|
||||
molfile_parmplugin_init(); \
|
||||
molfile_pbeqplugin_init(); \
|
||||
molfile_pdbplugin_init(); \
|
||||
molfile_pdbxplugin_init(); \
|
||||
molfile_phiplugin_init(); \
|
||||
molfile_pltplugin_init(); \
|
||||
molfile_plyplugin_init(); \
|
||||
molfile_pqrplugin_init(); \
|
||||
molfile_psfplugin_init(); \
|
||||
molfile_raster3dplugin_init(); \
|
||||
molfile_rst7plugin_init(); \
|
||||
molfile_situsplugin_init(); \
|
||||
molfile_spiderplugin_init(); \
|
||||
molfile_stlplugin_init(); \
|
||||
molfile_tinkerplugin_init(); \
|
||||
molfile_uhbdplugin_init(); \
|
||||
molfile_vaspchgcarplugin_init(); \
|
||||
molfile_vaspoutcarplugin_init(); \
|
||||
molfile_vaspparchgplugin_init(); \
|
||||
molfile_vaspposcarplugin_init(); \
|
||||
molfile_vasp5xdatcarplugin_init(); \
|
||||
molfile_vaspxdatcarplugin_init(); \
|
||||
molfile_vaspxmlplugin_init(); \
|
||||
molfile_vtkplugin_init(); \
|
||||
molfile_xbgfplugin_init(); \
|
||||
molfile_xsfplugin_init(); \
|
||||
molfile_xyzplugin_init(); \
|
||||
molfile_dtrplugin_init(); \
|
||||
molfile_maeffplugin_init(); \
|
||||
|
||||
#define MOLFILE_REGISTER_ALL(v, cb) \
|
||||
molfile_abinitplugin_register(v, cb); \
|
||||
molfile_amiraplugin_register(v, cb); \
|
||||
molfile_avsplugin_register(v, cb); \
|
||||
molfile_babelplugin_register(v, cb); \
|
||||
molfile_basissetplugin_register(v, cb); \
|
||||
molfile_bgfplugin_register(v, cb); \
|
||||
molfile_binposplugin_register(v, cb); \
|
||||
molfile_biomoccaplugin_register(v, cb); \
|
||||
molfile_brixplugin_register(v, cb); \
|
||||
molfile_carplugin_register(v, cb); \
|
||||
molfile_ccp4plugin_register(v, cb); \
|
||||
molfile_corplugin_register(v, cb); \
|
||||
molfile_cpmdplugin_register(v, cb); \
|
||||
molfile_crdplugin_register(v, cb); \
|
||||
molfile_cubeplugin_register(v, cb); \
|
||||
molfile_dcdplugin_register(v, cb); \
|
||||
molfile_dlpolyplugin_register(v, cb); \
|
||||
molfile_dsn6plugin_register(v, cb); \
|
||||
molfile_dxplugin_register(v, cb); \
|
||||
molfile_edmplugin_register(v, cb); \
|
||||
molfile_fs4plugin_register(v, cb); \
|
||||
molfile_gamessplugin_register(v, cb); \
|
||||
molfile_graspplugin_register(v, cb); \
|
||||
molfile_grdplugin_register(v, cb); \
|
||||
molfile_gridplugin_register(v, cb); \
|
||||
molfile_gromacsplugin_register(v, cb); \
|
||||
molfile_jsplugin_register(v, cb); \
|
||||
molfile_lammpsplugin_register(v, cb); \
|
||||
molfile_mapplugin_register(v, cb); \
|
||||
molfile_mdfplugin_register(v, cb); \
|
||||
molfile_mol2plugin_register(v, cb); \
|
||||
molfile_moldenplugin_register(v, cb); \
|
||||
molfile_molemeshplugin_register(v, cb); \
|
||||
molfile_msmsplugin_register(v, cb); \
|
||||
molfile_namdbinplugin_register(v, cb); \
|
||||
molfile_offplugin_register(v, cb); \
|
||||
molfile_parm7plugin_register(v, cb); \
|
||||
molfile_parmplugin_register(v, cb); \
|
||||
molfile_pbeqplugin_register(v, cb); \
|
||||
molfile_pdbplugin_register(v, cb); \
|
||||
molfile_pdbxplugin_register(v, cb); \
|
||||
molfile_phiplugin_register(v, cb); \
|
||||
molfile_pltplugin_register(v, cb); \
|
||||
molfile_plyplugin_register(v, cb); \
|
||||
molfile_pqrplugin_register(v, cb); \
|
||||
molfile_psfplugin_register(v, cb); \
|
||||
molfile_raster3dplugin_register(v, cb); \
|
||||
molfile_rst7plugin_register(v, cb); \
|
||||
molfile_situsplugin_register(v, cb); \
|
||||
molfile_spiderplugin_register(v, cb); \
|
||||
molfile_stlplugin_register(v, cb); \
|
||||
molfile_tinkerplugin_register(v, cb); \
|
||||
molfile_uhbdplugin_register(v, cb); \
|
||||
molfile_vaspchgcarplugin_register(v, cb); \
|
||||
molfile_vaspoutcarplugin_register(v, cb); \
|
||||
molfile_vaspparchgplugin_register(v, cb); \
|
||||
molfile_vaspposcarplugin_register(v, cb); \
|
||||
molfile_vasp5xdatcarplugin_register(v, cb); \
|
||||
molfile_vaspxdatcarplugin_register(v, cb); \
|
||||
molfile_vaspxmlplugin_register(v, cb); \
|
||||
molfile_vtkplugin_register(v, cb); \
|
||||
molfile_xbgfplugin_register(v, cb); \
|
||||
molfile_xsfplugin_register(v, cb); \
|
||||
molfile_xyzplugin_register(v, cb); \
|
||||
molfile_dtrplugin_register(v, cb); \
|
||||
molfile_maeffplugin_register(v, cb); \
|
||||
|
||||
#define MOLFILE_FINI_ALL \
|
||||
molfile_abinitplugin_fini(); \
|
||||
molfile_amiraplugin_fini(); \
|
||||
molfile_avsplugin_fini(); \
|
||||
molfile_babelplugin_fini(); \
|
||||
molfile_basissetplugin_fini(); \
|
||||
molfile_bgfplugin_fini(); \
|
||||
molfile_binposplugin_fini(); \
|
||||
molfile_biomoccaplugin_fini(); \
|
||||
molfile_brixplugin_fini(); \
|
||||
molfile_carplugin_fini(); \
|
||||
molfile_ccp4plugin_fini(); \
|
||||
molfile_corplugin_fini(); \
|
||||
molfile_cpmdplugin_fini(); \
|
||||
molfile_crdplugin_fini(); \
|
||||
molfile_cubeplugin_fini(); \
|
||||
molfile_dcdplugin_fini(); \
|
||||
molfile_dlpolyplugin_fini(); \
|
||||
molfile_dsn6plugin_fini(); \
|
||||
molfile_dxplugin_fini(); \
|
||||
molfile_edmplugin_fini(); \
|
||||
molfile_fs4plugin_fini(); \
|
||||
molfile_gamessplugin_fini(); \
|
||||
molfile_graspplugin_fini(); \
|
||||
molfile_grdplugin_fini(); \
|
||||
molfile_gridplugin_fini(); \
|
||||
molfile_gromacsplugin_fini(); \
|
||||
molfile_jsplugin_fini(); \
|
||||
molfile_lammpsplugin_fini(); \
|
||||
molfile_mapplugin_fini(); \
|
||||
molfile_mdfplugin_fini(); \
|
||||
molfile_mol2plugin_fini(); \
|
||||
molfile_moldenplugin_fini(); \
|
||||
molfile_molemeshplugin_fini(); \
|
||||
molfile_msmsplugin_fini(); \
|
||||
molfile_namdbinplugin_fini(); \
|
||||
molfile_offplugin_fini(); \
|
||||
molfile_parm7plugin_fini(); \
|
||||
molfile_parmplugin_fini(); \
|
||||
molfile_pbeqplugin_fini(); \
|
||||
molfile_pdbplugin_fini(); \
|
||||
molfile_pdbxplugin_fini(); \
|
||||
molfile_phiplugin_fini(); \
|
||||
molfile_pltplugin_fini(); \
|
||||
molfile_plyplugin_fini(); \
|
||||
molfile_pqrplugin_fini(); \
|
||||
molfile_psfplugin_fini(); \
|
||||
molfile_raster3dplugin_fini(); \
|
||||
molfile_rst7plugin_fini(); \
|
||||
molfile_situsplugin_fini(); \
|
||||
molfile_spiderplugin_fini(); \
|
||||
molfile_stlplugin_fini(); \
|
||||
molfile_tinkerplugin_fini(); \
|
||||
molfile_uhbdplugin_fini(); \
|
||||
molfile_vaspchgcarplugin_fini(); \
|
||||
molfile_vaspoutcarplugin_fini(); \
|
||||
molfile_vaspparchgplugin_fini(); \
|
||||
molfile_vaspposcarplugin_fini(); \
|
||||
molfile_vasp5xdatcarplugin_fini(); \
|
||||
molfile_vaspxdatcarplugin_fini(); \
|
||||
molfile_vaspxmlplugin_fini(); \
|
||||
molfile_vtkplugin_fini(); \
|
||||
molfile_xbgfplugin_fini(); \
|
||||
molfile_xsfplugin_fini(); \
|
||||
molfile_xyzplugin_fini(); \
|
||||
molfile_dtrplugin_fini(); \
|
||||
molfile_maeffplugin_fini(); \
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
BIN
plugins/MACOSXARM64/molfile/maeffplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/maeffplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/mapplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/mapplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/mdfplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/mdfplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/mol2plugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/mol2plugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/moldenplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/moldenplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/molemeshplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/molemeshplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/msmsplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/msmsplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/namdbinplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/namdbinplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/offplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/offplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/parm7plugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/parm7plugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/parmplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/parmplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/pbeqplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/pbeqplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/pdbplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/pdbplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/pdbxplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/pdbxplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/phiplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/phiplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/pltplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/pltplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/plyplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/plyplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/pqrplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/pqrplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/psfplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/psfplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/raster3dplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/raster3dplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/rst7plugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/rst7plugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/situsplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/situsplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/spiderplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/spiderplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/stlplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/stlplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/tinkerplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/tinkerplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/uhbdplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/uhbdplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vasp5xdatcarplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vasp5xdatcarplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vaspchgcarplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vaspchgcarplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vaspoutcarplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vaspoutcarplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vaspparchgplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vaspparchgplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vaspposcarplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vaspposcarplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vaspxdatcarplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vaspxdatcarplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vaspxmlplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vaspxmlplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/vtkplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/vtkplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/xbgfplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/xbgfplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/xsfplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/xsfplugin.so
Executable file
Binary file not shown.
BIN
plugins/MACOSXARM64/molfile/xyzplugin.so
Executable file
BIN
plugins/MACOSXARM64/molfile/xyzplugin.so
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -89,6 +89,8 @@ s_fparams *init_def_fparams(void)
|
||||
par->write_par[0] = 'd';
|
||||
par->xpocket_n = 0;
|
||||
par->min_n_explicit_pocket_atoms = M_MIN_N_EXPLICIT_POCKET;
|
||||
par->n_chains_to_delete=0;
|
||||
par->n_chains_as_ligand=0;
|
||||
return par;
|
||||
}
|
||||
|
||||
@@ -122,7 +124,7 @@ s_fparams *get_fpocket_args(int nargs, char **args)
|
||||
char *apt;
|
||||
char *residue_string[M_MAX_CUSTOM_POCKET_LEN];
|
||||
short custom_ligand_i = 0;
|
||||
|
||||
const char *separators = ",:";
|
||||
static struct option fplong_options[] = {/*long options args located in fparams.h*/
|
||||
{"file", required_argument, 0, M_PAR_PDB_FILE},
|
||||
{"min_alpha_size", required_argument, 0, M_PAR_MIN_ASHAPE_SIZE},
|
||||
@@ -185,54 +187,53 @@ s_fparams *get_fpocket_args(int nargs, char **args)
|
||||
case M_PAR_CHAIN_AS_LIGAND: /*option with -a "name of the chain" to be specified as a ligand*/
|
||||
/*select the chains as ligand*/
|
||||
status++;
|
||||
strcpy(par->chain_as_ligand, optarg); /*par->chain_as_ligand contains the arg given in cmd line*/
|
||||
const char *separatorss = ","; /* defining separators*/
|
||||
pt = strtok(par->chain_as_ligand, separatorss);
|
||||
pt = strtok(optarg, separators);
|
||||
int nn = 0;
|
||||
while (pt != NULL)
|
||||
{
|
||||
strncpy(&(par->chain_as_ligand[nn]), pt, 1);
|
||||
par->chain_as_ligand[nn] = (char *)malloc((M_MAX_CHAIN_NAME_LENGTH + 1) * sizeof(char));
|
||||
strncpy(par->chain_as_ligand[nn], pt, M_MAX_CHAIN_NAME_LENGTH);
|
||||
par->chain_as_ligand[nn][M_MAX_CHAIN_NAME_LENGTH]='\0';
|
||||
nn++;
|
||||
pt = strtok(NULL, separatorss);
|
||||
pt = strtok(NULL, separators);
|
||||
}
|
||||
par->n_chains_as_ligand=nn;
|
||||
par->xlig_resnumber = 0;
|
||||
// printf("lig %s\n",par->chain_as_ligand);
|
||||
break;
|
||||
|
||||
case M_PAR_DROP_CHAINS: /*option with -c "name of the chains"*/
|
||||
/*drop the selected chains from the pdb file*/
|
||||
strcpy(par->chain_delete, optarg); /*par->custom_ligand contains the arg given in cmd line*/
|
||||
// printf("%s and %s",par->custom_ligand,optarg);
|
||||
const char *separators = ",:"; /* defining separators for drop chains args*/
|
||||
pt = strtok(par->chain_delete, separators);
|
||||
pt = strtok(optarg, separators);
|
||||
int n = 0;
|
||||
while (pt != NULL)
|
||||
{
|
||||
strncpy(&(par->chain_delete[n]), pt, 1);
|
||||
par->chain_delete[n] = (char *)malloc((M_MAX_CHAIN_NAME_LENGTH + 1) * sizeof(char));
|
||||
strncpy(par->chain_delete[n], pt, M_MAX_CHAIN_NAME_LENGTH);
|
||||
par->chain_delete[n][M_MAX_CHAIN_NAME_LENGTH]='\0';
|
||||
|
||||
n++;
|
||||
pt = strtok(NULL, separators);
|
||||
}
|
||||
par->chain_is_kept = 0;
|
||||
|
||||
// printf("%s\n",par->chain_delete);
|
||||
par->n_chains_to_delete=n;
|
||||
status++;
|
||||
break;
|
||||
|
||||
case M_PAR_KEEP_CHAINS: /*option with -k "name of the chains"*/
|
||||
/*drop the selected chains from the pdb file*/
|
||||
|
||||
strcpy(par->chain_delete, optarg); /*par->custom_ligand contains the arg given in cmd line*/
|
||||
// printf("%s and %s",par->custom_ligand,optarg);
|
||||
const char *separator = ",:"; /* defining separators for drop chains args*/
|
||||
pt = strtok(par->chain_delete, separator);
|
||||
pt = strtok(optarg, separators);
|
||||
int nk = 0;
|
||||
while (pt != NULL)
|
||||
{
|
||||
strncpy(&(par->chain_delete[nk]), pt, 1);
|
||||
|
||||
par->chain_delete[nk] = (char *)malloc((M_MAX_CHAIN_NAME_LENGTH + 1) * sizeof(char));
|
||||
strncpy(par->chain_delete[nk], pt, M_MAX_CHAIN_NAME_LENGTH);
|
||||
par->chain_delete[nk][M_MAX_CHAIN_NAME_LENGTH]='\0';
|
||||
nk++;
|
||||
pt = strtok(NULL, separator);
|
||||
pt = strtok(NULL, separators);
|
||||
}
|
||||
par->n_chains_to_delete=nk;
|
||||
// printf("%s\n",par->chain_delete);
|
||||
par->chain_is_kept = 1;
|
||||
status++;
|
||||
@@ -246,26 +247,29 @@ s_fparams *get_fpocket_args(int nargs, char **args)
|
||||
|
||||
status++;
|
||||
|
||||
strcpy(par->custom_ligand, optarg);
|
||||
// strcpy(par->custom_ligand, optarg);
|
||||
// printf("%s and %s",par->custom_ligand,optarg);
|
||||
pt = strtok(par->custom_ligand, ":");
|
||||
pt = strtok(optarg, ":");
|
||||
|
||||
while (pt != NULL)
|
||||
{
|
||||
custom_ligand_i++;
|
||||
if (custom_ligand_i == 1)
|
||||
par->xlig_resnumber = atoi(pt);
|
||||
else if (custom_ligand_i == 2)
|
||||
strncpy(&(par->xlig_resname), pt, 3);
|
||||
else if (custom_ligand_i == 3)
|
||||
strncpy(&(par->xlig_chain_code), pt, 1);
|
||||
/*int a = atoi(pt);
|
||||
printf("%d\n", a);*/
|
||||
else if (custom_ligand_i == 2){
|
||||
par->xlig_resname= (char *)malloc((M_MAX_LIG_RESNAME_LENGTH + 1) * sizeof(char));
|
||||
strncpy(par->xlig_resname, pt, M_MAX_LIG_RESNAME_LENGTH);
|
||||
par->xlig_resname[M_MAX_LIG_RESNAME_LENGTH]='\0';
|
||||
}
|
||||
else if (custom_ligand_i == 3){
|
||||
par->xlig_chain_code= (char *)malloc((M_MAX_CHAIN_NAME_LENGTH + 1) * sizeof(char));
|
||||
strncpy(par->xlig_chain_code, pt, M_MAX_CHAIN_NAME_LENGTH);
|
||||
par->xlig_chain_code[M_MAX_CHAIN_NAME_LENGTH]='\0';
|
||||
}
|
||||
pt = strtok(NULL, ":");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case M_PAR_CUSTOM_POCKET:
|
||||
|
||||
// parse pocket specification that has to be given as
|
||||
@@ -292,7 +296,7 @@ s_fparams *get_fpocket_args(int nargs, char **args)
|
||||
strcpy(&residue_string, pt);
|
||||
rest2 = residue_string;
|
||||
apti = 0;
|
||||
while (apt = strtok_r(rest2, ":", &rest2))
|
||||
while ((apt = strtok_r(rest2, ":", &rest2)))
|
||||
{
|
||||
switch (apti)
|
||||
{
|
||||
@@ -971,10 +975,10 @@ void print_pocket_usage(FILE *f)
|
||||
fprintf(f, "\t-%c --%s (string)\t\t: String specifying a ligand like: \n\
|
||||
\t\t\t\t\t\t residuenumber:residuename:chain_code (ie. 1224:PU8:A).\t\n",
|
||||
M_PAR_CUSTOM_LIGAND, M_PAR_CUSTOM_LIGAND_LONG);
|
||||
fprintf(f, "\t-%c --%s (string)\t\t: String specifying a pocket like: \n\
|
||||
fprintf(f, "\t-%c --%s (string)\t\t: String specifying a pocket like: \n\
|
||||
\t\t\t\t\t\t residuenumber1:insertion_code1('-' if empty):chain_code1.residuenumber2:insertion_code2:chain_code2 (ie. 138:-:A.139:-:A).\t\n",
|
||||
M_PAR_CUSTOM_POCKET, M_PAR_CUSTOM_POCKET_LONG);
|
||||
fprintf(f, "\t-%c --%s (int)\t: If explicit pocket provided, minimum number \n\
|
||||
fprintf(f, "\t-%c --%s (int)\t: If explicit pocket provided, minimum number \n\
|
||||
\t\t\t\t\t\t of atoms of an alpha sphere that have to be in the selected pocket.\t\n",
|
||||
M_PAR_MIN_N_EXPLICIT_POCKET, M_PAR_MIN_N_EXPLICIT_POCKET_LONG);
|
||||
fprintf(f, "\t-%c --%s (char)\t\t: Character specifying a chain as a ligand\t\n", M_PAR_CHAIN_AS_LIGAND, M_PAR_CHAIN_AS_LIGAND_LONG);
|
||||
|
||||
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
if (params->pdb_path == NULL || strlen(params->pdb_path) <= 0)
|
||||
if (!params->pdb_path[0] || strlen(params->pdb_path) <= 0)
|
||||
{
|
||||
fprintf(stdout, "! Invalid pdb name given.\n");
|
||||
print_pocket_usage(stdout);
|
||||
@@ -222,8 +222,10 @@ void process_pdb(char *pdbname, s_fparams *params)
|
||||
print_number_of_objects_in_memory();
|
||||
}
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "! PDB reading failed!\n");
|
||||
else {
|
||||
fprintf(stderr, "! Structure reading failed!\n");
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
}
|
||||
|
||||
s_pdb *open_file_format(char *fpath, const char *ligan, const int keep_lig, int model_number, s_fparams *par)
|
||||
|
||||
@@ -165,7 +165,7 @@ c_lst_pockets *search_pocket(s_pdb *pdb, s_fparams *params, s_pdb *pdb_w_lig)
|
||||
fflush(DEBUG_STREAM);
|
||||
}
|
||||
|
||||
apply_clustering(pockets, params);
|
||||
apply_clustering(pockets);
|
||||
if (DEBUG)
|
||||
{
|
||||
fprintf(DEBUG_STREAM, "applied clustering to pockets");
|
||||
@@ -216,7 +216,7 @@ c_lst_pockets *search_pocket(s_pdb *pdb, s_fparams *params, s_pdb *pdb_w_lig)
|
||||
print_number_of_objects_in_memory();
|
||||
// int i;
|
||||
|
||||
if (params->fpocket_running && params->flag_do_grid_calculations && params->topology_path)
|
||||
if (params->fpocket_running && params->flag_do_grid_calculations && params->topology_path[0])
|
||||
calculate_pocket_energy_grids(pockets, params, pdb);
|
||||
// params->fpocket_running &&
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ s_mdparams* get_mdpocket_args(int nargs, char **args) {
|
||||
par = NULL;
|
||||
print_mdpocket_usage(stdout);
|
||||
}
|
||||
} else if ((!traj_file_defined || !traj_format_defined || !par->fpar->pdb_path)) {
|
||||
} else if ((!traj_file_defined || !traj_format_defined || !par->fpar->pdb_path[0])) {
|
||||
fprintf(stdout, "! No input file given... Try again :).%d %d %s\n",traj_file_defined,traj_format_defined,par->fpar->pdb_path);
|
||||
free_mdparams(par);
|
||||
par = NULL;
|
||||
|
||||
@@ -260,15 +260,20 @@ float pte_get_enegativity(const char *symbol)
|
||||
*/
|
||||
char *pte_get_element_from_number(int atomicnumber)
|
||||
{
|
||||
|
||||
char *tmp=malloc(sizeof(char)*3) ;
|
||||
if(atomicnumber>0 && atomicnumber<112){
|
||||
|
||||
tmp[0] = ST_pte_symbol[atomicnumber][0] ;
|
||||
tmp[1] = ST_pte_symbol[atomicnumber][1] ;
|
||||
tmp[2] = '\0';
|
||||
tmp[2]='\0';
|
||||
return tmp;
|
||||
}
|
||||
return -1 ;
|
||||
} else {
|
||||
tmp[0]='-';
|
||||
tmp[1]='1';
|
||||
}
|
||||
tmp[2]='\0';
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ int run_qconvex(FILE *fin,FILE *fout) {
|
||||
boolT ismalloc;
|
||||
|
||||
int argc=2;
|
||||
char *argv[2];
|
||||
const char *argv[2];
|
||||
argv[0]=malloc(sizeof(char)*200);
|
||||
argv[0]="src/qhull/qconvex\0";
|
||||
argv[1]=malloc(sizeof(char)*2);
|
||||
|
||||
@@ -239,7 +239,7 @@ int run_qvoronoi(FILE *fin,FILE *fout) {
|
||||
coordT *points;
|
||||
boolT ismalloc;
|
||||
int argc=6;
|
||||
char *argv[6];
|
||||
const char *argv[6];
|
||||
argv[0]=malloc(sizeof(char)*200);
|
||||
argv[0]="src/qhull/qvoronoi\0";
|
||||
argv[1]=malloc(sizeof(char)*2);
|
||||
|
||||
145
src/read_mmcif.c
145
src/read_mmcif.c
@@ -56,38 +56,39 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
|
||||
molfile_pdbxplugin_init();
|
||||
molfile_pdbxplugin_register(NULL, register_cb);
|
||||
char *filetype = "cif";
|
||||
const char *filetype = "cif";
|
||||
int inatoms; /*number of atoms in the file determined by molfile api*/
|
||||
// printf("%s | %s |%d", fpath, filetype, inatoms);
|
||||
// printf("\n");
|
||||
void *h_in;
|
||||
molfile_timestep_t ts_in;
|
||||
molfile_atom_t *at_in;
|
||||
int optflags = 0x0040;
|
||||
int optflags[] = {0x0001,0x0040};
|
||||
int rc;
|
||||
int rc2;
|
||||
int j;
|
||||
int k;
|
||||
|
||||
h_in = api->open_file_read(fpath, filetype, &inatoms);
|
||||
if(inatoms==0){
|
||||
fprintf(stderr, "! Structure reading failed or file is empty!\n");
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
at_in = (molfile_atom_t *)malloc(inatoms * sizeof(molfile_atom_t));
|
||||
ts_in.coords = (float *)malloc(3 * inatoms * sizeof(float)); /*allocating space for the coords*/
|
||||
rc2 = api->read_structure(h_in, &optflags, at_in);
|
||||
rc2 = api->read_structure(h_in, optflags, at_in);
|
||||
rc = api->read_next_timestep(h_in, inatoms, &ts_in);
|
||||
if (!model_number)
|
||||
model_number = 1;
|
||||
model_flag = 1;
|
||||
for (i = 0; i < inatoms; i++) /*loop to go through all atoms*/
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == '.' || at_in[i].altloc[0] == '\0')
|
||||
at_in[i].altloc[0] = ' ';
|
||||
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(par->chain_as_ligand, at_in[i].chain[0]))
|
||||
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand))
|
||||
{
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A')
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '?')
|
||||
{
|
||||
if (chains_to_delete(par->chain_delete, at_in[i].chain[0], par->chain_is_kept))
|
||||
if (chains_to_delete(par->chain_delete, at_in[i].chain_auth, par->chain_is_kept,par->n_chains_to_delete))
|
||||
{
|
||||
/* Atom entry: check if there is a ligand in there (just in case)... */
|
||||
if (ligan && strlen(ligan) > 1 && ligan[0] == at_in[i].resname[0] && ligan[1] == at_in[i].resname[1] && ligan[2] == at_in[i].resname[2])
|
||||
@@ -99,7 +100,7 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
}
|
||||
/*check this function*/
|
||||
}
|
||||
else if (ligan && strlen(ligan) == 1 && at_in[i].chain[0] == ligan[0])
|
||||
else if (ligan && strlen(ligan) == 1 && at_in[i].chain_auth[0] == ligan[0])
|
||||
{ /*here we have a protein chain defined as ligand...a bit more complex then*/
|
||||
if (keep_lig)
|
||||
{
|
||||
@@ -114,13 +115,7 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
}
|
||||
if (par->xlig_resnumber > -1)
|
||||
{
|
||||
|
||||
// if ((at_in[i].chain[0] == par->xlig_chain_code[0] && at_in[i].resid == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]) || (at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]))
|
||||
// {
|
||||
// pdb->n_xlig_atoms++;
|
||||
// }
|
||||
|
||||
if (is_ligand(par->chain_as_ligand, at_in[i].chain[0]))
|
||||
if (is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand))
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
}
|
||||
@@ -129,26 +124,25 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
if (par->xlig_resnumber > -1)
|
||||
{
|
||||
|
||||
if ((at_in[i].chain[0] == par->xlig_chain_code[0] && at_in[i].resid == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]) || (at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]))
|
||||
if (((is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand)) || (par->xlig_chain_code !=NULL && at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]) || (par->xlig_chain_code!=NULL && at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2])))
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(par->chain_as_ligand, at_in[i].chain[0])))
|
||||
else if ((at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6)) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand)))
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
if (at_in[i].altloc[0] == '?' || at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
{
|
||||
|
||||
if (chains_to_delete(par->chain_delete, at_in[i].chain[0], par->chain_is_kept))
|
||||
if (chains_to_delete(par->chain_delete, at_in[i].chain_auth, par->chain_is_kept,par->n_chains_to_delete))
|
||||
{
|
||||
if (ligan && strlen(ligan) > 1 && keep_lig && ligan[0] == at_in[i].resname[0] && ligan[1] == at_in[i].resname[1] && ligan[2] == at_in[i].resname[2])
|
||||
{
|
||||
natm_lig++;
|
||||
natoms++;
|
||||
}
|
||||
else if (ligan && strlen(ligan) == 1 && ligan[0] == at_in[i].chain[0])
|
||||
else if (ligan && strlen(ligan) == 1 && ligan[0] == at_in[i].chain_auth[0])
|
||||
{
|
||||
if (keep_lig)
|
||||
natm_lig++;
|
||||
@@ -157,13 +151,13 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
else
|
||||
{
|
||||
/* Keep specific HETATM given in the static list ST_keep_hetatm */
|
||||
if ((keep_lig && !ligan && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3)) || (keep_lig && is_ligand(par->chain_as_ligand, at_in[i].chain[0])))
|
||||
if ((keep_lig && !ligan && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3)) || (keep_lig && is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand)))
|
||||
{
|
||||
|
||||
natoms++;
|
||||
nhetatm++;
|
||||
}
|
||||
else if (!is_ligand(par->chain_as_ligand, at_in[i].chain[0]))
|
||||
else if (!is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand))
|
||||
{
|
||||
for (j = 0; j < ST_nb_keep_hetatm; j++)
|
||||
{
|
||||
@@ -178,14 +172,14 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
|
||||
}
|
||||
}
|
||||
|
||||
if (is_ligand(par->chain_as_ligand, at_in[i].chain[0]))
|
||||
if (is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand))
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
}
|
||||
}
|
||||
if (par->xlig_resnumber > -1)
|
||||
{
|
||||
if ((at_in[i].chain[0] == par->xlig_chain_code[0] && at_in[i].resid == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]) || (at_in[i].chain_auth[0] == par->xlig_chain_code[0] && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]))
|
||||
{
|
||||
if ((is_ligand(par->chain_as_ligand, at_in[i].chain_auth,par->n_chains_as_ligand)) || (par->xlig_chain_code !=NULL && !strcmp(at_in[i].chain_auth,par->xlig_chain_code) && (at_in[i].resid_auth == par->xlig_resnumber) && (par->xlig_resname[0] == at_in[i].resname[0]) && (par->xlig_resname[1] == at_in[i].resname[1]) && (par->xlig_resname[2] == at_in[i].resname[2])) || (par->xlig_chain_code!=NULL && !strcmp(at_in[i].chain_auth, par->xlig_chain_code) && at_in[i].resid_auth == par->xlig_resnumber && par->xlig_resname[0] == at_in[i].resname[0] && par->xlig_resname[1] == at_in[i].resname[1] && par->xlig_resname[2] == at_in[i].resname[2]))
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
}
|
||||
@@ -260,7 +254,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
/*******************************************************************************/
|
||||
molfile_pdbxplugin_init();
|
||||
molfile_pdbxplugin_register(NULL, register_cb);
|
||||
char *filetype = "cif";
|
||||
const char *filetype = "cif";
|
||||
int inatoms; /*number of atoms in the file determined by molfile api*/
|
||||
|
||||
void *h_in;
|
||||
@@ -277,6 +271,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
ts_in.coords = (float *)malloc(3 * inatoms * sizeof(float)); /*allocating space for the coords*/
|
||||
rc2 = api->read_structure(h_in, &optflags, at_in);
|
||||
rc = api->read_next_timestep(h_in, inatoms, &ts_in);
|
||||
|
||||
// printf("READ : %s | %s |%d\n", pdb->fname, filetype, inatoms);
|
||||
/* Loop over the pdb file */
|
||||
model_flag = 1;
|
||||
@@ -285,25 +280,26 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
; /*here we indicate that a particular model should be read only*/
|
||||
for (i = 0; i < inatoms; i++)
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == '.' || at_in[i].altloc[0] == '\0')
|
||||
at_in[i].altloc[0] = ' ';
|
||||
|
||||
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(params->chain_as_ligand, at_in[i].chain[0]))
|
||||
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand))
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1' || at_in[i].altloc[0] == '?')
|
||||
{ /*if within first occurence*/
|
||||
/* Enter this if when arg in command line is -r */
|
||||
|
||||
/* Enter this if when arg in command line is -a */
|
||||
if (is_ligand(params->chain_as_ligand, at_in[i].chain[0]))
|
||||
if (is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand))
|
||||
{
|
||||
*(pdb->xlig_x + i_explicit_ligand_atom) = ts_in.coords[3 * i];
|
||||
*(pdb->xlig_y + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 1];
|
||||
*(pdb->xlig_z + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 2];
|
||||
i_explicit_ligand_atom++;
|
||||
}
|
||||
if (chains_to_delete(params->chain_delete, at_in[i].chain[0], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
if (chains_to_delete(params->chain_delete, at_in[i].chain_auth, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
/* Check if the desired ligand is in such an entry */
|
||||
if (ligan && strlen(ligan) > 1 && ligan[0] == at_in[i].resname[0] && ligan[1] == at_in[i].resname[1] && ligan[2] == at_in[i].resname[2])
|
||||
@@ -317,8 +313,10 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
strcpy(atom->name, at_in[i].type);
|
||||
atom->pdb_aloc = at_in[i].altloc[0];
|
||||
strcpy(atom->res_name, at_in[i].resname);
|
||||
strncpy(atom->chain, at_in[i].chain, 2);
|
||||
atom->res_id = at_in[i].resid;
|
||||
strcpy(atom->chain, at_in[i].chain_auth);
|
||||
strcpy(atom->label_asym_id, at_in[i].chain);
|
||||
atom->res_id = at_in[i].resid_auth;
|
||||
atom->label_seq_id=at_in[i].resid;
|
||||
atom->pdb_insert = at_in[i].insertion[0];
|
||||
atom->x = ts_in.coords[(3 * i)];
|
||||
atom->y = ts_in.coords[(3 * i) + 1];
|
||||
@@ -342,7 +340,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
ligfound = 1;
|
||||
}
|
||||
}
|
||||
else if (ligan && strlen(ligan) == 1 && at_in[i].chain[0] == ligan[0])
|
||||
else if (ligan && strlen(ligan) == 1 && at_in[i].chain_auth[0] == ligan[0])
|
||||
{ /*here we have a protein chain defined as ligand...a bit more complex then*/
|
||||
if (keep_lig)
|
||||
{
|
||||
@@ -354,9 +352,10 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
strcpy(atom->name, at_in[i].type);
|
||||
atom->pdb_aloc = at_in[i].altloc[0];
|
||||
strcpy(atom->res_name, at_in[i].resname);
|
||||
strncpy(atom->chain, at_in[i].chain, 2);
|
||||
atom->res_id = at_in[i].resid;
|
||||
// fprintf(stdout, " here : %c\n", at_in[i].insertion[0]);
|
||||
strcpy(atom->chain, at_in[i].chain_auth);
|
||||
strcpy(atom->label_asym_id, at_in[i].chain);
|
||||
atom->res_id = at_in[i].resid_auth;
|
||||
atom->label_seq_id=at_in[i].resid;
|
||||
atom->pdb_insert = at_in[i].insertion[0];
|
||||
atom->x = ts_in.coords[(3 * i)];
|
||||
atom->y = ts_in.coords[(3 * i) + 1];
|
||||
@@ -399,13 +398,13 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
strcpy(atom->name, at_in[i].type);
|
||||
atom->pdb_aloc = at_in[i].altloc[0];
|
||||
strcpy(atom->res_name, at_in[i].resname);
|
||||
// fprintf(stdout,"%s |%s|%d\n", atom->chain, at_in[i].chain,i);
|
||||
// fflush(stdout);
|
||||
strncpy(atom->chain, at_in[i].chain, 2);
|
||||
// fprintf(stdout,"%s |%s|%d\n", atom->chain, at_in[i].chain,i);
|
||||
atom->res_id = at_in[i].resid;
|
||||
|
||||
strcpy(atom->chain, at_in[i].chain_auth);
|
||||
strcpy(atom->label_asym_id, at_in[i].chain);
|
||||
|
||||
atom->res_id = at_in[i].resid_auth;
|
||||
atom->label_seq_id=at_in[i].resid;
|
||||
atom->pdb_insert = at_in[i].insertion[0];
|
||||
// printf("ins:%s",at_in[i].insertion);
|
||||
|
||||
atom->x = ts_in.coords[(3 * i)];
|
||||
atom->y = ts_in.coords[(3 * i) + 1];
|
||||
@@ -435,9 +434,10 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
}
|
||||
if (pdb->n_xlig_atoms)
|
||||
{
|
||||
if (at_in[i].chain[0] == params->xlig_chain_code[0] && at_in[i].resid == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2])
|
||||
{
|
||||
unsigned short is_chain_ligand=(is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand) && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3));
|
||||
|
||||
if (is_chain_ligand || (params->xlig_chain_code !=NULL && at_in[i].chain_auth[0] == params->xlig_chain_code[0] && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]))
|
||||
{
|
||||
*(pdb->xlig_x + i_explicit_ligand_atom) = ts_in.coords[3 * i];
|
||||
*(pdb->xlig_y + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 1];
|
||||
*(pdb->xlig_z + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 2];
|
||||
@@ -445,23 +445,22 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(params->chain_as_ligand, at_in[i].chain[0])))
|
||||
else if ((at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6)) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand)))
|
||||
{
|
||||
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
|
||||
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1' || at_in[i].altloc[0] =='?')
|
||||
{ /*first occurence*/
|
||||
|
||||
if (is_ligand(params->chain_as_ligand, at_in[i].chain[0]))
|
||||
if (is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand))
|
||||
{
|
||||
*(pdb->xlig_x + i_explicit_ligand_atom) = ts_in.coords[3 * i];
|
||||
*(pdb->xlig_y + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 1];
|
||||
*(pdb->xlig_z + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 2];
|
||||
|
||||
// printf("%d\n", i_explicit_ligand_atom);
|
||||
i_explicit_ligand_atom++;
|
||||
}
|
||||
// fflush(stdout);
|
||||
if (chains_to_delete(params->chain_delete, at_in[i].chain[0], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
if (chains_to_delete(params->chain_delete, at_in[i].chain_auth, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
/* Check if the desired ligand is in HETATM entry */
|
||||
if (ligan && strlen(ligan) > 1 && keep_lig && ligan[0] == at_in[i].resname[0] && ligan[1] == at_in[i].resname[1] && ligan[2] == at_in[i].resname[2])
|
||||
@@ -473,9 +472,12 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
strcpy(atom->name, at_in[i].type);
|
||||
atom->pdb_aloc = at_in[i].altloc[0];
|
||||
strcpy(atom->res_name, at_in[i].resname);
|
||||
strncpy(atom->chain, at_in[i].chain, 2);
|
||||
atom->res_id = at_in[i].resid;
|
||||
strcpy(atom->chain, at_in[i].chain_auth);
|
||||
strcpy(atom->label_asym_id, at_in[i].chain);
|
||||
atom->res_id = at_in[i].resid_auth;
|
||||
atom->label_seq_id=at_in[i].resid;
|
||||
atom->pdb_insert = at_in[i].insertion[0];
|
||||
|
||||
atom->x = ts_in.coords[(3 * i)];
|
||||
atom->y = ts_in.coords[(3 * i) + 1];
|
||||
atom->z = ts_in.coords[(3 * i) + 2];
|
||||
@@ -497,7 +499,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
iatoms++;
|
||||
ligfound = 1;
|
||||
}
|
||||
else if (ligan && strlen(ligan) == 1 && ligan[0] == at_in[i].chain[0])
|
||||
else if (ligan && strlen(ligan) == 1 && ligan[0] == at_in[i].chain_auth[0])
|
||||
{
|
||||
|
||||
if (keep_lig)
|
||||
@@ -510,8 +512,10 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
strcpy(atom->name, at_in[i].type);
|
||||
atom->pdb_aloc = at_in[i].altloc[0];
|
||||
strcpy(atom->res_name, at_in[i].resname);
|
||||
strncpy(atom->chain, at_in[i].chain, 2);
|
||||
atom->res_id = at_in[i].resid;
|
||||
strcpy(atom->chain, at_in[i].chain_auth);
|
||||
strcpy(atom->label_asym_id, at_in[i].chain);
|
||||
atom->res_id = at_in[i].resid_auth;
|
||||
atom->label_seq_id=at_in[i].resid;
|
||||
atom->pdb_insert = at_in[i].insertion[0];
|
||||
atom->x = ts_in.coords[(3 * i)];
|
||||
atom->y = ts_in.coords[(3 * i) + 1];
|
||||
@@ -539,7 +543,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
{
|
||||
|
||||
/* Keep specific HETATM given in the static list ST_keep_hetatm. */
|
||||
if ((keep_lig && !ligan && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3)) || (keep_lig && is_ligand(params->chain_as_ligand, at_in[i].chain[0])))
|
||||
if ((keep_lig && !ligan && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3)) || (keep_lig && is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand)))
|
||||
{
|
||||
|
||||
atom = atoms + iatoms;
|
||||
@@ -548,9 +552,12 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
strcpy(atom->name, at_in[i].type);
|
||||
atom->pdb_aloc = at_in[i].altloc[0];
|
||||
strcpy(atom->res_name, at_in[i].resname);
|
||||
strncpy(atom->chain, at_in[i].chain, 2);
|
||||
atom->res_id = at_in[i].resid;
|
||||
strcpy(atom->chain, at_in[i].chain_auth);
|
||||
strcpy(atom->label_asym_id, at_in[i].chain);
|
||||
atom->res_id = at_in[i].resid_auth;
|
||||
atom->label_seq_id=at_in[i].resid;
|
||||
atom->pdb_insert = at_in[i].insertion[0];
|
||||
|
||||
atom->x = ts_in.coords[(3 * i)];
|
||||
atom->y = ts_in.coords[(3 * i) + 1];
|
||||
atom->z = ts_in.coords[(3 * i) + 2];
|
||||
@@ -570,7 +577,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
ihetatm++;
|
||||
iatoms++;
|
||||
}
|
||||
else if (!is_ligand(params->chain_as_ligand, at_in[i].chain[0]))
|
||||
else if (!is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand))
|
||||
{
|
||||
|
||||
for (j = 0; j < ST_nb_keep_hetatm; j++)
|
||||
@@ -586,8 +593,10 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
strcpy(atom->name, at_in[i].type);
|
||||
atom->pdb_aloc = at_in[i].altloc[0];
|
||||
strcpy(atom->res_name, at_in[i].resname);
|
||||
strncpy(atom->chain, at_in[i].chain, 2);
|
||||
atom->res_id = at_in[i].resid;
|
||||
strcpy(atom->chain, at_in[i].chain_auth);
|
||||
strcpy(atom->label_asym_id, at_in[i].chain);
|
||||
atom->res_id = at_in[i].resid_auth;
|
||||
atom->label_seq_id=at_in[i].resid;
|
||||
atom->pdb_insert = at_in[i].insertion[0];
|
||||
atom->x = ts_in.coords[(3 * i)];
|
||||
atom->y = ts_in.coords[(3 * i) + 1];
|
||||
@@ -615,16 +624,18 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pdb->n_xlig_atoms)
|
||||
{
|
||||
if ((at_in[i].chain[0] == params->xlig_chain_code[0] && at_in[i].resid == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]) || (at_in[i].chain_auth[0] == params->xlig_chain_code[0] && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]))
|
||||
{
|
||||
// if (params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2]) {
|
||||
|
||||
unsigned short is_chain_ligand=(is_ligand(params->chain_as_ligand, at_in[i].chain_auth,params->n_chains_as_ligand) && strncmp(at_in[i].resname, "HOH", 3) && strncmp(at_in[i].resname, "WAT", 3) && strncmp(at_in[i].resname, "TIP", 3));
|
||||
|
||||
if (is_chain_ligand || (params->xlig_chain_code !=NULL && at_in[i].chain_auth[0] == params->xlig_chain_code[0] && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]) || (params->xlig_chain_code!=NULL && at_in[i].chain_auth[0] == params->xlig_chain_code[0] && at_in[i].resid_auth == params->xlig_resnumber && params->xlig_resname[0] == at_in[i].resname[0] && params->xlig_resname[1] == at_in[i].resname[1] && params->xlig_resname[2] == at_in[i].resname[2]))
|
||||
{
|
||||
|
||||
*(pdb->xlig_x + i_explicit_ligand_atom) = ts_in.coords[3 * i];
|
||||
*(pdb->xlig_y + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 1];
|
||||
*(pdb->xlig_z + i_explicit_ligand_atom) = ts_in.coords[(3 * i) + 2];
|
||||
|
||||
i_explicit_ligand_atom++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
void
|
||||
|
||||
*/
|
||||
void apply_clustering(c_lst_pockets *pockets, s_fparams *params)
|
||||
void apply_clustering(c_lst_pockets *pockets)
|
||||
{
|
||||
node_pocket *nextPocket;
|
||||
node_pocket *curMobilePocket;
|
||||
|
||||
187
src/rpdb.c
187
src/rpdb.c
@@ -803,6 +803,8 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
int i;
|
||||
float x, y, z;
|
||||
int resnbuf = 0;
|
||||
char *chainbuf=(char *)my_malloc(sizeof(char)*2);
|
||||
chainbuf[1]='\0';
|
||||
int model_flag = 0; /*by default we consider that no particular model is read*/
|
||||
int model_read = 0; /*flag tracking the status if a current line is read or not*/
|
||||
int cur_model_count = 0; /*when reading NMR models, then count on which model you currently are*/
|
||||
@@ -848,12 +850,12 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
}
|
||||
if (pdb->model_flag == 0 || model_read == 1)
|
||||
{
|
||||
|
||||
if (!strncmp(buf, "ATOM ", 5) && !is_ligand(par->chain_as_ligand, buf[21]))
|
||||
chainbuf[0]=buf[21];
|
||||
if (!strncmp(buf, "ATOM ", 5) && !is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand))
|
||||
{
|
||||
|
||||
// printf("%s",par->chain_delete ); // deleting the chains we want to delete from pdb file
|
||||
if (chains_to_delete(par->chain_delete, buf[21], par->chain_is_kept))
|
||||
if (chains_to_delete(par->chain_delete, chainbuf, par->chain_is_kept,par->n_chains_to_delete))
|
||||
{
|
||||
/* Check if this is the first occurence of this atom*/
|
||||
rpdb_extract_atm_resname(buf, resb);
|
||||
@@ -862,7 +864,7 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
}
|
||||
if ((buf[16] == ' ' || buf[16] == 'A') && x < 9990 && y < 9990 && z < 9990)
|
||||
{
|
||||
if (chains_to_delete(par->chain_delete, buf[21], par->chain_is_kept))
|
||||
if (chains_to_delete(par->chain_delete, chainbuf, par->chain_is_kept,par->n_chains_to_delete))
|
||||
{
|
||||
/* Atom entry: check if there is a ligand in there (just in case)... */
|
||||
if (ligan && strlen(ligan) > 1 && ligan[0] == resb[0] && ligan[1] == resb[1] && ligan[2] == resb[2])
|
||||
@@ -891,20 +893,9 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
/*handle explicit ligand input here*/
|
||||
if (par->xlig_resnumber > -1)
|
||||
{
|
||||
|
||||
// if (resb[0] == par->xlig_resname[0] && resb[1] == par->xlig_resname[1] && resb[2] == par->xlig_resname[2]) {
|
||||
// fprintf(stdout,"%s\t%s\n",buf[16],par->xlig_chain_code);
|
||||
|
||||
// if (buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2])
|
||||
// {
|
||||
// pdb->n_xlig_atoms++;
|
||||
// fprintf(stdout, "%d\n", pdb->n_xlig_atoms);
|
||||
// }
|
||||
|
||||
if (is_ligand(par->chain_as_ligand, buf[21]))
|
||||
if (is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand))
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
// fprintf(stdout, "%d\t", pdb->n_xlig_atoms);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -912,7 +903,11 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
{
|
||||
if (par->xlig_resnumber > -1)
|
||||
{
|
||||
if (buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2])
|
||||
if (is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand))
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
}
|
||||
else if (par->xlig_chain_code!=NULL && buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2])
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
}
|
||||
@@ -920,11 +915,11 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
}
|
||||
}
|
||||
|
||||
else if (!strncmp(buf, "HETATM", 6) || (!strncmp(buf, "ATOM ", 5) && is_ligand(par->chain_as_ligand, buf[21])))
|
||||
else if (!strncmp(buf, "HETATM", 6) || (!strncmp(buf, "ATOM ", 5) && is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand)))
|
||||
{
|
||||
if (chains_to_delete(par->chain_delete, buf[21], par->chain_is_kept))
|
||||
{
|
||||
|
||||
if (chains_to_delete(par->chain_delete, chainbuf, par->chain_is_kept,par->n_chains_to_delete))
|
||||
{
|
||||
/*Check again for the first occurence*/
|
||||
rpdb_extract_atom_coordinates(buf, &x, &y, &z); /*extract and double check coordinates to avoid issues with wrong coordinates*/
|
||||
resnbuf = rpdb_extract_atm_resumber(buf);
|
||||
@@ -932,11 +927,12 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
if ((buf[16] == ' ' || buf[16] == 'A') && x < 9990 && y < 9990 && z < 9990)
|
||||
{
|
||||
/* Hetatom entry: check if there is a ligand in there too... */
|
||||
if (chains_to_delete(par->chain_delete, buf[21], par->chain_is_kept))
|
||||
|
||||
if (chains_to_delete(par->chain_delete, chainbuf, par->chain_is_kept,par->n_chains_to_delete))
|
||||
{
|
||||
rpdb_extract_atm_resname(buf, resb);
|
||||
|
||||
// printf("%s ",ligan);
|
||||
|
||||
if (ligan && strlen(ligan) > 1 && keep_lig && ligan[0] == resb[0] && ligan[1] == resb[1] && ligan[2] == resb[2])
|
||||
{
|
||||
natm_lig++;
|
||||
@@ -951,13 +947,12 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
else
|
||||
{
|
||||
/* Keep specific HETATM given in the static list ST_keep_hetatm */
|
||||
if ((keep_lig && !ligan && strncmp(resb, "HOH", 3) && strncmp(resb, "WAT", 3) && strncmp(resb, "TIP", 3)) || (keep_lig && is_ligand(par->chain_as_ligand, buf[21])))
|
||||
if ((keep_lig && !ligan && strncmp(resb, "HOH", 3) && strncmp(resb, "WAT", 3) && strncmp(resb, "TIP", 3)) || (keep_lig && is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand)))
|
||||
{
|
||||
// printf("%s|%c ",resb,buf[21]);
|
||||
natoms++;
|
||||
nhetatm++;
|
||||
}
|
||||
else if (!is_ligand(par->chain_as_ligand, buf[21]))
|
||||
else if (!is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand))
|
||||
{
|
||||
for (i = 0; i < ST_nb_keep_hetatm; i++)
|
||||
{
|
||||
@@ -972,19 +967,9 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
}
|
||||
}
|
||||
|
||||
/*handle explicit ligand input here*/
|
||||
|
||||
// if (par->xlig_resnumber > -1)
|
||||
// {
|
||||
// if (buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2])
|
||||
// {
|
||||
// pdb->n_xlig_atoms++;
|
||||
// }
|
||||
// }
|
||||
if (is_ligand(par->chain_as_ligand, buf[21]))
|
||||
if (is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand))
|
||||
{
|
||||
pdb->n_xlig_atoms++;
|
||||
// fprintf(stdout, "H%d\t", pdb->n_xlig_atoms);
|
||||
}
|
||||
}
|
||||
if (x < 9990 && y < 9990 && z < 9990)
|
||||
@@ -994,9 +979,9 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
|
||||
|
||||
if (par->xlig_resnumber > -1)
|
||||
{
|
||||
if (buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2])
|
||||
unsigned short is_chain_ligand=(is_ligand(par->chain_as_ligand, chainbuf,par->n_chains_as_ligand) && strncmp(resb, "HOH", 3) && strncmp(resb, "WAT", 3) && strncmp(resb, "TIP", 3));
|
||||
if (is_chain_ligand || (par->xlig_chain_code!=NULL && buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2]))
|
||||
{
|
||||
|
||||
pdb->n_xlig_atoms++;
|
||||
}
|
||||
}
|
||||
@@ -1099,6 +1084,8 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
int model_flag = 0; /*by default we consider that no particular model is read*/
|
||||
int model_read = 0; /*flag tracking the status if a current line is read or not*/
|
||||
int cur_model_count = 0; /*when reading NMR models, then count on which model you currently are*/
|
||||
char *chainbuf=(char *)my_malloc(sizeof(char)*2);
|
||||
chainbuf[1]='\0';
|
||||
s_atm *atom = NULL;
|
||||
s_atm *atoms = pdb->latoms;
|
||||
s_atm **atoms_p = pdb->latoms_p;
|
||||
@@ -1125,10 +1112,10 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
if (pdb->model_flag == 0 || model_read == 1)
|
||||
{
|
||||
|
||||
if (strncmp(pdb_line, "ATOM ", 5) == 0 && !is_ligand(params->chain_as_ligand, pdb_line[21]))
|
||||
if (strncmp(pdb_line, "ATOM ", 5) == 0 && !is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand))
|
||||
{
|
||||
|
||||
if (chains_to_delete(params->chain_delete, pdb_line[21], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
chainbuf[0]=pdb_line[21];
|
||||
if (chains_to_delete(params->chain_delete, chainbuf, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
// printf("%s\n",params->chain_delete);
|
||||
|
||||
@@ -1139,30 +1126,20 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
if ((pdb_line[16] == ' ' || pdb_line[16] == 'A') && tmpx < 9990 && tmpy < 9990 && tmpz < 9990)
|
||||
{ /*if within first occurence*/
|
||||
/* Store ATOM entry */
|
||||
if (chains_to_delete(params->chain_delete, pdb_line[21], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
if (chains_to_delete(params->chain_delete, chainbuf, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
rpdb_extract_atm_resname(pdb_line, resb);
|
||||
|
||||
resnbuf = rpdb_extract_atm_resumber(pdb_line);
|
||||
}
|
||||
/* Enter this if when arg in command line is -r */
|
||||
// if (pdb->n_xlig_atoms)
|
||||
// {
|
||||
// if (pdb_line[21] == params->xlig_chain_code[0] && resnbuf == params->xlig_resnumber && params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2])
|
||||
// {
|
||||
|
||||
// rpdb_extract_atom_coordinates(pdb_line, (pdb->xlig_x + i_explicit_ligand_atom), (pdb->xlig_y + i_explicit_ligand_atom), (pdb->xlig_z + i_explicit_ligand_atom));
|
||||
// i_explicit_ligand_atom++;
|
||||
// }
|
||||
// }
|
||||
|
||||
/* Enter this if when arg in command line is -a */
|
||||
if (is_ligand(params->chain_as_ligand, pdb_line[21]))
|
||||
if (is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand))
|
||||
{
|
||||
rpdb_extract_atom_coordinates(pdb_line, (pdb->xlig_x + i_explicit_ligand_atom), (pdb->xlig_y + i_explicit_ligand_atom), (pdb->xlig_z + i_explicit_ligand_atom));
|
||||
i_explicit_ligand_atom++;
|
||||
}
|
||||
if (chains_to_delete(params->chain_delete, pdb_line[21], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
if (chains_to_delete(params->chain_delete, chainbuf, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
/* Check if the desired ligand is in such an entry */
|
||||
if (ligan && strlen(ligan) > 1 && ligan[0] == resb[0] && ligan[1] == resb[1] && ligan[2] == resb[2])
|
||||
@@ -1184,6 +1161,9 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
atom->radius = pte_get_vdw_ray(atom->symbol);
|
||||
atom->electroneg = pte_get_enegativity(atom->symbol);
|
||||
atom->sort_x = -1;
|
||||
atom->label_seq_id=atom->res_id;
|
||||
strcpy(atom->label_asym_id, atom->chain);
|
||||
|
||||
|
||||
atoms_p[iatoms] = atom;
|
||||
iatoms++;
|
||||
@@ -1212,7 +1192,9 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
atom->radius = pte_get_vdw_ray(atom->symbol);
|
||||
atom->electroneg = pte_get_enegativity(atom->symbol);
|
||||
atom->sort_x = -1;
|
||||
|
||||
atom->label_seq_id=atom->res_id;
|
||||
strcpy(atom->label_asym_id, atom->chain);
|
||||
|
||||
atoms_p[iatoms] = atom;
|
||||
iatoms++;
|
||||
|
||||
@@ -1238,6 +1220,9 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
atom->radius = pte_get_vdw_ray(atom->symbol);
|
||||
atom->electroneg = pte_get_enegativity(atom->symbol);
|
||||
atom->sort_x = -1;
|
||||
atom->label_seq_id=atom->res_id;
|
||||
strcpy(atom->label_asym_id, atom->chain);
|
||||
|
||||
// printf("type : %s, id : %d, name : %s, aloc : %c, res_name : %s, chain : %s, res_id : %d, pdb_insert : %c, occupancy : %f, b_factor : %f, symbol : %s, charge : %d\n",
|
||||
// atom->type, atom->id,atom->name ,atom->pdb_aloc,atom->res_name,atom->chain,atom->res_id,atom->pdb_insert,atom->occupancy,atom->bfactor, atom->symbol,atom->charge);
|
||||
// printf("electroneg : %s\n",atom->symbol);
|
||||
@@ -1252,8 +1237,10 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
{
|
||||
rpdb_extract_atm_resname(pdb_line, resb);
|
||||
resnbuf = rpdb_extract_atm_resumber(pdb_line);
|
||||
|
||||
unsigned short is_chain_ligand=(is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand) && strncmp(resb, "HOH", 3) && strncmp(resb, "WAT", 3) && strncmp(resb, "TIP", 3));
|
||||
|
||||
if (pdb_line[21] == params->xlig_chain_code[0] && resnbuf == params->xlig_resnumber && params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2])
|
||||
if (is_chain_ligand || (params->xlig_chain_code!=NULL && (pdb_line[21] == params->xlig_chain_code[0] && resnbuf == params->xlig_resnumber && params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2])))
|
||||
{
|
||||
|
||||
rpdb_extract_atom_coordinates(pdb_line, (pdb->xlig_x + i_explicit_ligand_atom), (pdb->xlig_y + i_explicit_ligand_atom), (pdb->xlig_z + i_explicit_ligand_atom));
|
||||
@@ -1262,33 +1249,25 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (strncmp(pdb_line, "HETATM", 6) == 0 || (strncmp(pdb_line, "ATOM ", 5) == 0 && is_ligand(params->chain_as_ligand, pdb_line[21])))
|
||||
|
||||
else if (strncmp(pdb_line, "HETATM", 6) == 0 || (strncmp(pdb_line, "ATOM ", 5) == 0 && is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand)))
|
||||
{
|
||||
if (chains_to_delete(params->chain_delete, pdb_line[21], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
chainbuf[0]=pdb_line[21];
|
||||
if (chains_to_delete(params->chain_delete, chainbuf, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
rpdb_extract_atom_coordinates(pdb_line, &tmpx, &tmpy, &tmpz); /*extract and double check coordinates to avoid issues with wrong coordinates*/
|
||||
resnbuf = rpdb_extract_atm_resumber(pdb_line);
|
||||
}
|
||||
if ((pdb_line[16] == ' ' || pdb_line[16] == 'A') && tmpx < 9990 && tmpy < 9990 && tmpz < 9990)
|
||||
{ /*first occurence*/
|
||||
/* Check HETATM entry */
|
||||
if (chains_to_delete(params->chain_delete, pdb_line[21], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
|
||||
if (chains_to_delete(params->chain_delete, chainbuf, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
rpdb_extract_atm_resname(pdb_line, resb);
|
||||
resnbuf = rpdb_extract_atm_resumber(pdb_line);
|
||||
}
|
||||
|
||||
// if (pdb->n_xlig_atoms)
|
||||
// {
|
||||
// if (pdb_line[21] == params->xlig_chain_code[0] && resnbuf == params->xlig_resnumber && params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2])
|
||||
// {
|
||||
// // if (params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2]) {
|
||||
|
||||
// rpdb_extract_atom_coordinates(pdb_line, (pdb->xlig_x + i_explicit_ligand_atom), (pdb->xlig_y + i_explicit_ligand_atom), (pdb->xlig_z + i_explicit_ligand_atom));
|
||||
|
||||
// i_explicit_ligand_atom++;
|
||||
// }
|
||||
// }
|
||||
if (is_ligand(params->chain_as_ligand, pdb_line[21]))
|
||||
if (is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand))
|
||||
{
|
||||
|
||||
rpdb_extract_atom_coordinates(pdb_line, (pdb->xlig_x + i_explicit_ligand_atom), (pdb->xlig_y + i_explicit_ligand_atom), (pdb->xlig_z + i_explicit_ligand_atom));
|
||||
@@ -1296,7 +1275,7 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
i_explicit_ligand_atom++;
|
||||
}
|
||||
// fflush(stdout);
|
||||
if (chains_to_delete(params->chain_delete, pdb_line[21], params->chain_is_kept)) // deleting the chains we want to delete from pdb file
|
||||
if (chains_to_delete(params->chain_delete, chainbuf, params->chain_is_kept,params->n_chains_to_delete)) // deleting the chains we want to delete from pdb file
|
||||
{
|
||||
/* Check if the desired ligand is in HETATM entry */
|
||||
if (ligan && strlen(ligan) > 1 && keep_lig && ligan[0] == resb[0] && ligan[1] == resb[1] && ligan[2] == resb[2])
|
||||
@@ -1313,7 +1292,9 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
atom->radius = pte_get_vdw_ray(atom->symbol);
|
||||
atom->electroneg = pte_get_enegativity(atom->symbol);
|
||||
atom->sort_x = -1;
|
||||
|
||||
atom->label_seq_id=atom->res_id;
|
||||
strcpy(atom->label_asym_id, atom->chain);
|
||||
|
||||
atoms_p[iatoms] = atom;
|
||||
atm_lig[iatm_lig] = atom;
|
||||
|
||||
@@ -1339,7 +1320,9 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
atom->radius = pte_get_vdw_ray(atom->symbol);
|
||||
atom->electroneg = pte_get_enegativity(atom->symbol);
|
||||
atom->sort_x = -1;
|
||||
|
||||
atom->label_seq_id=atom->res_id;
|
||||
strcpy(atom->label_asym_id, atom->chain);
|
||||
|
||||
atoms_p[iatoms] = atom;
|
||||
atm_lig[iatm_lig] = atom;
|
||||
|
||||
@@ -1350,9 +1333,8 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
}
|
||||
else if (pdb->lhetatm)
|
||||
{
|
||||
|
||||
/* Keep specific HETATM given in the static list ST_keep_hetatm. */
|
||||
if ((keep_lig && !ligan && strncmp(resb, "HOH", 3) && strncmp(resb, "WAT", 3) && strncmp(resb, "TIP", 3)) || (keep_lig && is_ligand(params->chain_as_ligand, pdb_line[21])))
|
||||
if ((keep_lig && !ligan && strncmp(resb, "HOH", 3) && strncmp(resb, "WAT", 3) && strncmp(resb, "TIP", 3)) || (keep_lig && is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand)))
|
||||
{
|
||||
|
||||
atom = atoms + iatoms;
|
||||
@@ -1368,13 +1350,15 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
atom->radius = pte_get_vdw_ray(atom->symbol);
|
||||
atom->electroneg = pte_get_enegativity(atom->symbol);
|
||||
atom->sort_x = -1;
|
||||
|
||||
atom->label_seq_id=atom->res_id;
|
||||
strcpy(atom->label_asym_id, atom->chain);
|
||||
|
||||
atoms_p[iatoms] = atom;
|
||||
pdb->lhetatm[ihetatm] = atom;
|
||||
ihetatm++;
|
||||
iatoms++;
|
||||
}
|
||||
else if (!is_ligand(params->chain_as_ligand, pdb_line[21]))
|
||||
else if (!is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand))
|
||||
{
|
||||
|
||||
for (i = 0; i < ST_nb_keep_hetatm; i++)
|
||||
@@ -1396,7 +1380,9 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
atom->radius = pte_get_vdw_ray(atom->symbol);
|
||||
atom->electroneg = pte_get_enegativity(atom->symbol);
|
||||
atom->sort_x = -1;
|
||||
|
||||
atom->label_seq_id=atom->res_id;
|
||||
strcpy(atom->label_asym_id, atom->chain);
|
||||
|
||||
atoms_p[iatoms] = atom;
|
||||
pdb->lhetatm[ihetatm] = atom;
|
||||
ihetatm++;
|
||||
@@ -1416,7 +1402,9 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
{
|
||||
resnbuf = rpdb_extract_atm_resumber(pdb_line);
|
||||
rpdb_extract_atm_resname(pdb_line, resb);
|
||||
if (pdb_line[21] == params->xlig_chain_code[0] && resnbuf == params->xlig_resnumber && params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2])
|
||||
unsigned short is_chain_ligand=(is_ligand(params->chain_as_ligand, chainbuf,params->n_chains_as_ligand) && strncmp(resb, "HOH", 3) && strncmp(resb, "WAT", 3) && strncmp(resb, "TIP", 3));
|
||||
|
||||
if (is_chain_ligand || (params->xlig_chain_code!=NULL && (pdb_line[21] == params->xlig_chain_code[0] && resnbuf == params->xlig_resnumber && params->xlig_resname[0] == resb[0] && params->xlig_resname[1] == resb[1] && params->xlig_resname[2] == resb[2])))
|
||||
{
|
||||
|
||||
rpdb_extract_atom_coordinates(pdb_line, (pdb->xlig_x + i_explicit_ligand_atom), (pdb->xlig_y + i_explicit_ligand_atom), (pdb->xlig_z + i_explicit_ligand_atom));
|
||||
@@ -1426,6 +1414,7 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (strncmp(pdb_line, "CRYST1", 6) == 0)
|
||||
{
|
||||
rpdb_extract_cryst1(pdb_line, &(pdb->alpha), &(pdb->beta), &(pdb->gamma),
|
||||
@@ -1463,11 +1452,6 @@ void rpdb_read(s_pdb *pdb, const char *ligan, const int keep_lig, int model_numb
|
||||
int num_h_atoms = get_number_of_h_atoms(pdb);
|
||||
pdb->natoms_h = num_h_atoms;
|
||||
pdb->avg_bfactor /= (iatoms - num_h_atoms);
|
||||
// pdb->avg_bfactor=0.0;
|
||||
|
||||
/*if(guess_flag>0) {
|
||||
fprintf(stderr, ">! Warning: You did not provide a standard PDB file.\nElements were guessed by fpocket, because not provided in the PDB file. \nThere is no guarantee on the results!\n");
|
||||
}*/
|
||||
|
||||
if (ligan && keep_lig && (ligfound == 0 || pdb->natm_lig <= 0))
|
||||
{
|
||||
@@ -1574,50 +1558,49 @@ void free_pdb_atoms(s_pdb *pdb)
|
||||
int
|
||||
|
||||
*/
|
||||
int chains_to_delete(char *chains_selected, char current_line_chain, int is_chain_kept)
|
||||
int chains_to_delete(char *chains_selected[20], char *current_line_chain, int is_chain_kept,unsigned short n_chains_to_delete)
|
||||
{ /*deletes the chains selected by command -c, returns true if the chain correspond false if not*/
|
||||
|
||||
if (is_chain_kept == 0)
|
||||
{
|
||||
int is_deleted = 1;
|
||||
int i = 0;
|
||||
for (i = 0; i < M_MAX_CHAINS_DELETE; i++)
|
||||
for (i = 0; i < n_chains_to_delete; i++)
|
||||
{
|
||||
if (chains_selected[i] == current_line_chain)
|
||||
if (!strcmp(chains_selected[i], current_line_chain))
|
||||
{
|
||||
// printf("%c_%c ", chains_selected[i],current_line_chain);
|
||||
is_deleted = 0;
|
||||
}
|
||||
}
|
||||
// printf("\n");
|
||||
return is_deleted;
|
||||
}
|
||||
else
|
||||
{
|
||||
int is_deleted = 0;
|
||||
int is_kept = 0;
|
||||
|
||||
int i = 0;
|
||||
for (i = 0; i < M_MAX_CHAINS_DELETE; i++)
|
||||
for (i = 0; i < n_chains_to_delete; i++)
|
||||
{
|
||||
if (chains_selected[i] == current_line_chain)
|
||||
if (!strcmp(chains_selected[i], current_line_chain))
|
||||
{
|
||||
// printf("%c_%c ", chains_selected[i],current_line_chain);
|
||||
is_deleted = 1;
|
||||
is_kept = 1;
|
||||
}
|
||||
}
|
||||
// printf("\n");
|
||||
return is_deleted;
|
||||
return is_kept;
|
||||
}
|
||||
}
|
||||
|
||||
int is_ligand(char *chains_selected, char current_line_chain)
|
||||
|
||||
|
||||
int is_ligand(char *chains_selected[20], char *current_line_chain, unsigned short n_chains_as_ligand)
|
||||
{
|
||||
|
||||
int is_a_ligand = 0;
|
||||
int i;
|
||||
for (i = 0; i < M_MAX_CHAINS_DELETE; i++)
|
||||
for (i = 0; i < n_chains_as_ligand; i++)
|
||||
{
|
||||
if (chains_selected[i] == current_line_chain)
|
||||
if (!strcmp(chains_selected[i],current_line_chain))
|
||||
{
|
||||
// printf("%c_%c ", chains_selected[i],current_line_chain);
|
||||
is_a_ligand = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1488,23 +1488,23 @@ void write_mmcif_vert(FILE *f, s_vvertice *v, int i)
|
||||
if (v->electrostatic_energy <= -0.05)
|
||||
{
|
||||
|
||||
write_mmcif_atom_line(f, "HETATM", i, " POL",
|
||||
' ', "ACC", "O", v->resid, ' ',
|
||||
write_mmcif_atom_line(f, "HETATM", i, "POL",
|
||||
'.', "ACC", "O", v->resid, "O",v->resid,'.',
|
||||
v->x, v->y, v->z, 0.0, 0.0, 0,
|
||||
"V", -1, 0.0);
|
||||
}
|
||||
else if (v->electrostatic_energy >= 0.05)
|
||||
{
|
||||
|
||||
write_mmcif_atom_line(f, "HETATM", i, " POL", ' ', "DON", "N",
|
||||
v->resid, ' ', v->x, v->y, v->z, 0.0, 0.0, 0,
|
||||
write_mmcif_atom_line(f, "HETATM", i, "POL", '.', "DON", "N",
|
||||
v->resid, "N",v->resid,'.', v->x, v->y, v->z, 0.0, 0.0, 0,
|
||||
"V", -1, 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
write_mmcif_atom_line(f, "HETATM", i, "APOL", ' ', "STP", "C",
|
||||
v->resid, ' ', v->x, v->y, v->z, 0.0, 0.0, 0,
|
||||
write_mmcif_atom_line(f, "HETATM", i, "APOL", '.', "STP", "C",
|
||||
v->resid, "C", v->resid,'.', v->x, v->y, v->z, 0.0, 0.0, 0,
|
||||
"V", -1, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user