Skip to content

Commit 176c122

Browse files
committed
Merge branch 'main' of github.com:prody/ProDy into hpb
2 parents 9ae04c5 + 9776bb5 commit 176c122

File tree

16 files changed

+243
-39
lines changed

16 files changed

+243
-39
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is a first draft, which is based on the ProDy website page http://prody.csb.pitt.edu/manual/devel/develop.html. Please see that page for updates.
1+
This is a first draft, which is based on the ProDy website page http://www.bahargroup.org/prody/manual/devel/develop.html. Please see that page for updates.
22

33

44
Install Git and a GUI

PKG-INFO

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ Description: .. image:: https://secure.travis-ci.org/prody/ProDy.png?branch=mast
3232
You can run ProDy on all major platforms. For download and installation
3333
instructions see:
3434

35-
* http://prody.csb.pitt.edu/downloads
35+
* http://www.bahargroup.org/prody/downloads
3636

3737

3838
DOCUMENTATION
3939
-------------
4040

41-
* Homepage: http://prody.csb.pitt.edu/
41+
* Homepage: http://www.bahargroup.org/prody/
4242

43-
* Tutorials: http://prody.csb.pitt.edu/tutorials
43+
* Tutorials: http://www.bahargroup.org/prody/tutorials
4444

45-
* Reference: http://prody.csb.pitt.edu/manual
45+
* Reference: http://www.bahargroup.org/prody/manual
4646

47-
* Applications: http://prody.csb.pitt.edu/manual/apps
47+
* Applications: http://www.bahargroup.org/prody/manual/apps
4848

49-
* NMWiz GUI: http://prody.csb.pitt.edu/nmwiz
49+
* NMWiz GUI: http://www.bahargroup.org/prody/nmwiz
5050

51-
* Changes: http://prody.csb.pitt.edu/manual/release
51+
* Changes: http://www.bahargroup.org/prody/manual/release
5252

5353

5454
SOURCE CODE

docs/apps/prody/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ the output files are prefixed with :file:`p38_anm`::
4040

4141
The output file :file:`p38_anm.nmd` can be visualized using `NMWiz`_.
4242

43-
.. _NMWiz: http://prody.csb.pitt.edu/nmwiz/
43+
.. _NMWiz: http://www.bahargroup.org/prody/nmwiz/

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@
158158
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
159159
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
160160
'matplotlib': ('http://matplotlib.sourceforge.net/', None),
161-
'prodywebsite': ('http://prody.csb.pitt.edu/', None),
161+
'prodywebsite': ('http://www.bahargroup.org/prody/', None),
162162
}
163163

164164
rst_epilog = u"""
165165
166-
.. _ProDy: http://prody.csb.pitt.edu
167-
.. _Tutorials: http://prody.csb.pitt.edu/tutorials
166+
.. _ProDy: http://www.bahargroup.org/prody
167+
.. _Tutorials: http://www.bahargroup.org/prody/tutorials
168168
.. _NMWiz: http://csb.pitt.edu/NMWiz
169169
.. _VMD: http://www.ks.uiuc.edu/Research/vmd
170170
.. _PDB: http://www.pdb.org

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ProDy Manual
1111
.. only:: rtd and html
1212

1313
This is a partial copy of ProDy documentation. Please visit
14-
`ProDy Homepage <http://prody.csb.pitt.edu>`_ for complete
14+
`ProDy Homepage <http://www.bahargroup.org/prody>`_ for complete
1515
documentation with tutorials.
1616

1717

prody/compounds/pdbligands.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from prody import LOGGER, SETTINGS, getPackagePath, PY3K
99
from prody.atomic import AtomGroup, ATOMIC_FIELDS
1010
from prody.utilities import openFile, makePath, openURL
11+
from .ccd import parseCCD
1112

1213
__all__ = ['PDBLigandRecord', 'fetchPDBLigand', 'parsePDBLigand']
1314

@@ -18,13 +19,20 @@ def __init__(self, data):
1819
self._rawdata = data
1920

2021
def getCanonicalSMILES(self):
21-
return self._rawdata['CACTVS_SMILES_CANONICAL']
22+
canonical = None
23+
for row in self._rawdata[2].data:
24+
if row['_pdbx_chem_comp_descriptor.type'] == 'SMILES_CANONICAL':
25+
canonical = row['_pdbx_chem_comp_descriptor.descriptor']
26+
return canonical
2227

2328

2429
def fetchPDBLigand(cci, filename=None):
25-
"""Fetch PDB ligand data from PDB_ for chemical component *cci*.
30+
"""Handle PDB ligand data from PDB_ for chemical component *cci*.
2631
*cci* may be 3-letter chemical component identifier or a valid XML
27-
filename. If *filename* is given, XML file will be saved with that name.
32+
filename. If *filename* is given, XML file will be saved with that name.
33+
34+
This function may not work as _PDB is not hosting ligand XML files anymore.
35+
It is kept for use with existing ligand XML files.
2836
2937
If you query ligand data frequently, you may configure ProDy to save XML
3038
files in your computer. Set ``ligand_xml_save`` option **True**, i.e.
@@ -50,6 +58,7 @@ def fetchPDBLigand(cci, filename=None):
5058
ideal (energy minimized) coordinate sets:
5159
5260
.. ipython:: python
61+
:okexcept:
5362
5463
from prody import *
5564
ligand_data = fetchPDBLigand('STI')
@@ -233,8 +242,8 @@ def fetchPDBLigand(cci, filename=None):
233242
return dict_
234243

235244

236-
def parsePDBLigand(cci, filename=None):
245+
def parsePDBLigand(cci):
237246
"""See :func:`.fetchPDBLigand`"""
238-
lig_dict = fetchPDBLigand(cci, filename)
247+
lig_dict = parseCCD(cci)
239248
return PDBLigandRecord(lig_dict)
240249

prody/ensemble/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def buildPDBEnsemble(atomics, ref=None, title='Unknown', labels=None, atommaps=N
411411

412412
if 'mapping_func' in kwargs:
413413
raise DeprecationWarning('mapping_func is deprecated. Please see release notes for '
414-
'more details: http://prody.csb.pitt.edu/manual/release/v1.11_series.html')
414+
'more details: http://www.bahargroup.org/prody/manual/release/v1.11_series.html')
415415
start = time.time()
416416

417417
if not isListLike(atomics):

prody/proteins/pdbfile.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,10 @@ def _parsePDBLines(atomgroup, lines, split, model, chain, subset,
490490
elements = np.zeros(asize, dtype=ATOMIC_FIELDS['element'].dtype)
491491
bfactors = np.zeros(asize, dtype=ATOMIC_FIELDS['beta'].dtype)
492492
occupancies = np.zeros(asize, dtype=ATOMIC_FIELDS['occupancy'].dtype)
493-
anisou = None
494493
siguij = None
495494
else:
496495
radii = np.zeros(asize, dtype=ATOMIC_FIELDS['radius'].dtype)
497-
496+
anisou = None
498497
asize = 2000 # increase array length by this much when needed
499498

500499
start = split
@@ -537,19 +536,7 @@ def _parsePDBLines(atomgroup, lines, split, model, chain, subset,
537536
dec = True
538537
while i < stop:
539538
line = lines[i]
540-
if not isPDB:
541-
fields = line.split()
542-
if len(fields) == 10:
543-
fields.insert(4, '')
544-
elif len(fields) != 11:
545-
LOGGER.warn('wrong number of fields for PQR format at line %d'%i)
546-
i += 1
547-
continue
548-
549-
if isPDB:
550-
startswith = line[0:6].strip()
551-
else:
552-
startswith = fields[0]
539+
startswith = line[0:6].strip()
553540

554541
if startswith == 'ATOM' or startswith == 'HETATM':
555542
if isPDB:
@@ -560,6 +547,17 @@ def _parsePDBLines(atomgroup, lines, split, model, chain, subset,
560547
else:
561548
resname = line[17:20].strip()
562549
else:
550+
fields = line.split()
551+
if fields[5].find('.') != -1:
552+
# coords too early as no chid
553+
fields.insert(4, '')
554+
if len(fields) != 11:
555+
try:
556+
fields = fields[:6] + [line[30:38].strip(), line[38:46].strip(), line[46:54].strip()] + line[54:].split()
557+
except:
558+
LOGGER.warn('wrong number of fields for PQR format at line %d'%i)
559+
i += 1
560+
continue
563561
atomname= fields[2]
564562
resname = fields[3]
565563

@@ -1689,7 +1687,10 @@ def writePQRStream(stream, atoms, **kwargs):
16891687
write = stream.write
16901688

16911689
calphas = atoms.ca
1692-
ssa = calphas.getSecstrs()
1690+
if calphas is not None:
1691+
ssa = calphas.getSecstrs()
1692+
else:
1693+
ssa = None
16931694
helix = []
16941695
sheet = []
16951696
if ssa is not None:

prody/proteins/waterbridges.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,9 @@ def analyseFrame(i, interactions_all):
638638

639639
if max_proc == 1:
640640
interactions_all = []
641-
for j0, frame0 in enumerate(traj, start=start_frame):
641+
for i in range(len(atoms.getCoordsets()[start_frame:stop_frame])):
642642
interactions_all.append([])
643-
analyseFrame(j0, start_frame, frame0, interactions_all)
643+
analyseFrame(i, interactions_all)
644644
else:
645645
with mp.Manager() as manager:
646646
interactions_all = manager.list()

prody/tests/datafiles/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,26 @@
381381
'file': 'pdb7pbl.pdb',
382382
'atoms': 31396,
383383
'nucleoside': 252
384+
},
385+
'pqrUnknown': {
386+
'file': 'pqr_snippet1.pqr',
387+
'atoms': 5,
388+
'models': 1
389+
},
390+
'pqrTranscomp': {
391+
'file': 'pqr_snippet2_transcomp.pqr',
392+
'atoms': 5,
393+
'models': 1
394+
},
395+
'pqrFpocket': {
396+
'file': 'pqr_snippet3_fpocket.pqr',
397+
'atoms': 5,
398+
'models': 1
399+
},
400+
'pqrPymol': {
401+
'file': 'pqr_snippet4_pymol.pqr',
402+
'atoms': 5,
403+
'models': 1
384404
}
385405
}
386406

0 commit comments

Comments
 (0)