68 Commits

Author SHA1 Message Date
Pedro Lacerda
8f957b847e Attempt to detect delocalized atoms (#439) 2025-05-04 13:27:23 -04:00
Jarrett Johnson
83f11bc317 More Replace NULL with nullptr 2024-06-02 20:44:43 -04:00
Jarrett Johnson
fbfda4a257 Replace NULL with nullptr 2024-05-20 09:07:33 -04:00
Thomas Holder
abc307745d iterate: Add explicit_valence and explicit_degree (#227) 2022-03-11 17:37:26 -05:00
Thomas Holder
d589382ffc Fix fallback MMTF loader (#226)
* Fix fallback MMTF loader

`msgpack-python` 1.0 uses `raw=False` by default, which means that data
(including dictionary keys) are `str` instead of `bytes`.

Also works with `u-msgpack-python` 2.7, which uses `str` as well with
Python 3 and ignores the `raw` argument.

Fixes https://github.com/schrodinger/pymol-open-source/issues/225

* Fix tests for chempy.mmtf

- testLoadMMTFMissingOptionalGroupTypeFields
- testLoadMMTFStr
- testLoadRawMMTF
2022-03-08 16:36:56 -05:00
Jarrett Johnson
07d7a790f0 Forward decls/Move headers to source 2021-08-20 11:24:10 -04:00
Thomas Holder
6f77e5efb0 GIL pre-conditions 2021-04-28 05:15:35 -04:00
Thomas Holder
ddcc931077 Graceful error message for "label all, stereo"
... if rdkit and SCHRODINGER are not available.
2021-03-26 13:48:21 +01:00
Thomas Holder
3c48f80eac Wizard pretty error printing 2021-01-14 15:31:42 +01:00
Thomas Holder
dc2aff4133 Refactor: Doxygen comments, ObjectMoleculeUpdateNeighbors
- Use proper doxygen syntax for all function comments
- ObjectMoleculeUpdateNeighbors allow const argument
- Remove obsolete ObjectMolecule::BondCounter
2021-01-14 15:23:06 +01:00
Thomas Holder
3d6863248c Fix cmd.alter IPython __tracebackhide__ issue 2021-01-14 14:08:34 +01:00
Thomas Holder
6cb2b6f05f Some library mode cleanup
- Remove message "PyMOL not running, entering library mode"
- Disable library mode when non-singleton instances are created
- Remove `_cmd._del` and use a capsule destructor instead, this fixes
  `pymol2.PyMOL().__del__` with Python 3.8 (`_cmd` is `None`).
- Clean up `Cmd_New` and `PyMOL_New`
2020-11-19 13:49:30 +01:00
Jarrett Johnson
e4a8aaca9c SceneClick logic extraction and misc improvements 2020-11-11 16:53:13 +01:00
Jarrett Johnson
4431dd0ce2 Settings copied on object copy 2020-10-16 11:07:17 +02:00
Jarrett Johnson
7fdba91496 pymol::GIL_Ensure 2020-08-04 14:02:28 +02:00
Thomas Holder
639a367080 IncentiveOnlyException C++ error propagation
- selection by p.foo
- iterate/alter p.foo
2020-07-17 12:53:05 +02:00
Thomas Holder
b9de9957b1 Properties dialog: flags, label, cartoon, oneletter
- Expose additional fields
- Use binary or hex formatting if applicable
2020-07-03 15:24:34 +02:00
Thomas Holder
39723012f2 iterate/alter: Propagate exceptions 2020-07-03 15:24:24 +02:00
Thomas Holder
256afbe07a Refactor iterate wrappers
- Inherit types from PyObject
- Add Wrapper_Type.tp_dealloc
- Use unique_PyObject_ptr instead of Py_DECREF
- Remove PyMOL 2.0 text_type removal notice
2020-07-03 15:08:50 +02:00
Thomas Holder
60bafcace1 Remove _PYMOL_NO_UNDO stubs 2020-06-22 11:07:06 +02:00
Thomas Holder
0bd6bbbdaa PYMOL-3410 Remove some Python #defines 2020-06-05 09:13:06 +02:00
Thomas Holder
6f11b62566 PYMOL-3410 Remove Python 2 support 2020-06-05 09:13:06 +02:00
Thomas Holder
b57f131940 -Wunused-variable 2019-11-27 13:18:08 +01:00
Thomas Holder
276640cd29 Port EPAM's VR fork to PyMOL 2.4
Porting the essential parts of EPAM System's "openvr" branch to the
master branch.

Original authors:
Natalia Smirnova, EPAM Systems, Inc.
Pavel Smirnov, EPAM Systems, Inc.

Original fork:
https://github.com/epam/pymol-open-source/tree/openvr

Adjustments:
- Make feature optional with "--openvr" compile option
- Python 3 support
- Remove C++11 workarounds
- Exclude build system changes

Co-authored-by: Natalia Smirnova <Natalia_Smirnova@epam.com>
Co-authored-by: Pavel Smirnov <pavel_smirnov1@epam.com>
2019-11-11 00:50:01 -08:00
Thomas Holder
2d89d2c628 pymol::Error::Code 2019-10-15 13:45:20 +02:00
Thomas Holder
dfd521c2fd cleanup some thread locking logic
- use context managers
- remove `lock_api_c` (not needed)
- add progress bar to GUI (only visible while `cmd.get_progress() >= 0`)
- make `_cmd._draw`, `_cmd._getRedisplay`, etc. non-blocking to make
  progress bar possible
2019-08-13 15:29:32 +02:00
Thomas Holder
cfee8dfd65 handle raise_exceptions from Cmd.cpp 2019-06-19 10:38:35 +02:00
Thomas Holder
3bd9c8eddc remove --retina option 2019-04-23 16:40:07 +02:00
Jarrett Johnson
37f95ef227 ObjectMolecule proper C++ inheritance 2019-03-29 13:04:12 +01:00
Thomas Holder
b59ce09d8a refactor: pymol::malloc<T>
- use typed/namespaced malloc wrapper
- remove Alloc et al.
- remove mmalloc et al.
- remove CINTERFACE define
2019-02-21 17:41:58 +01:00
Thomas Holder
5e04325863 cleanup (local/unused function declarations) 2019-02-06 15:43:14 +01:00
Thomas Holder
3956270b6e cleanup: remove _sgi_stereo 2019-01-29 20:43:44 +01:00
Jarrett Johnson
b5bc074b9b Replaced old Queue impl with std::queue 2018-12-06 08:51:23 +01:00
Thomas Holder
2162bb8d2e setup.py: cleanup 2018-12-04 20:31:35 +01:00
Thomas Holder
c2ed3f0bcd Properties dialog: fix settings 2018-07-31 09:20:07 +02:00
Thomas Holder
665aa6884a fix wildcard, fix PDB 99999 crash, PQR parsing...
* fix selection wildcard (sf.net/p/pymol/bugs/209)
* fix PDB atom id > 99999 crash
* more robust PQR parsing
* pymol2.PyMOL() context manager
* new setting: cif_metalc_as_zero_order_bonds
* new setting sdf_write_zero_order_bonds
* cif: accept _chem_comp_bond.type alias for _chem_comp_bond.value_order
* better support for mingwpy compiler (Christoph Gohlke)
2018-06-08 10:52:36 +00:00
Thomas Holder
7d2bb243e6 restore r4188
r4188 was published on 2018-04-10 but lost after a sourceforge storage problem.
See for example https://sourceforge.net/p/forge/site-support/17420/

2.2.0a0 (unstable/experimental)

* sf.net/p/pymol/bugs/199 bash -> sh
* ignore zero-order bonds in neighbor lookup
* fix crash loading reduced 5ijo.mmtf
* volume panel: fix zoom (CTRL+R-Drag) and value input (R-Click)
* QOpenGLWidget support (not active by default)
* --gldebug -> backtrace on GL error
2018-05-02 06:32:39 +00:00
Thomas Holder
4bbe42513c stick_round_nub, UTF-8, display_scale_factor, ...
* stick_round_nub for COLLADA export
* UTF-8 in feedback
* display_scale_factor (ported from Incentive PyMOL)
* dx map import: support "type float" and skewed delta
2018-02-28 13:16:16 +00:00
Thomas Holder
5acb6c4637 py37, align alt, flag 6+7
* Python 3.7 support (https://sf.net/p/pymol/bugs/197/)
* enable align with alt-codes
  - allow matching of non-alt-code to alt-code atoms in alignments
  - swap sorting priority of 'name' and 'alt' identifiers
  - sort empty 'alt' before non-empty 'alt'
* flags 6 and 7 for protein and nucleic acid
* mmCIF: read _atom_site.pdbx_formal_charge
* improve coordinate loading from mmcif chem_comp files
  - ignore columns with all ? (missing) values
  - select columns with "chem_comp_cartn_use" setting
* fix h_add: skip missing coordinates
2017-12-21 12:50:47 +00:00
Thomas Holder
889cbb280f auto library mode
* Python API: New "auto library mode". Automatically start a
  non-GUI PyMOL instance if the pymol.cmd API is used without
  running pymol.launch() first
* pdb_echo_tags for mmCIF and MMTF
* command parser: improve exception handling
* fix some PSE export memory leaks
* pymol2.cmd2: eliminate (non-weak) circular references
* movie making: reinterpolate after add_nutate/add_roll etc.
* support "module:callable" in loadfunctions/safefunctions
* yellow state indicator for discrete objects
* mpng modal draw improvements
2017-12-05 18:37:16 +00:00
Thomas Holder
c546b591ad oneletter, wire/licorice, copy_to
* expose "oneletter" to label/iterate
* sequence viewer: MSE=M SEC=U
* wire/licorice rep aliases
* menu: A > copy to object
* new commands: copy_to, uniquify
* fix slow 'extract' performance
2017-09-13 07:16:02 +00:00
Thomas Holder
09fe0a5fbc 1.8.7.0
* support "not ..." and "enabled" in name patterns (e.g.: delete not enabled)
* improve/fix unicode+utf-8 handling for labels
* iterate color settings: type int (e.g.: iterate all, print(s.sphere_color))
* fix cmd.load with contents https://sf.net/p/pymol/mailman/message/35966326/
* fix ray tracing of stick_ball + valence https://sf.net/p/pymol/mailman/message/35928857/
2017-08-02 11:36:28 +00:00
Thomas Holder
0629165364 patches/12, bugs/148
- web.pymolhttpd -> pymol.pymolhttpd
  Generic "web" name conflicts with webpy
  https://sf.net/p/pymol/bugs/148/
- make build reproducible
  https://sf.net/p/pymol/patches/12/
- delete obsolete packaging files
- internal command line: consistent behavior across platforms
2017-07-03 13:10:23 +00:00
Thomas Holder
e53f7d17eb label sele op, iterate/alter improvements, ...
* new "label" selection operator
* alter_state: remove restriction on x/y/z/flags
* iterate/label: expose "state" for discrete atoms
* CTRL+L drag/click -> move/center in 3-Button-Viewing mode
* auto-detect $PREFIX/share/pymol as $PYMOL_PATH
* locale LC_NUMERIC=C float parsing/formatting
* Python 3: fix wrong PyCapsule_New destructor
2017-06-01 10:09:12 +00:00
Thomas Holder
ed1f78cff9 Python 3.6 fixes 2017-04-26 13:08:45 +00:00
Thomas Holder
5b92a73de7 mmtf updates
- mmtf: "ignore" flag for hetatm
- mmtf: msgpack version check
- INSTALL: env variables documentation
- Tcl/Tk menu updates
2017-02-27 20:48:56 +00:00
Thomas Holder
1e324badee 1.8.5.1 (beta)
* fast MMTF load support in C++ (adds msgpack-c dependency)
* extra_fit: report RMS for method=cealign; Thanks to Hongbo Zhu
* CTRL-L ligand zoom
* preset > classified (auto_show_classified equivalent)
* preset > interface (ported from Incentive PyMOL 1.8.0)
* set_key auto-completion
* command completion for selection language
* fix connect_mode=4 for N-H1 and N-H3
* fix CGO ALPHA and dup COLOR issue
2017-02-23 14:37:57 +00:00
Thomas Holder
f6cfe9c55a mpng width/height, pick_shading/surface_color_smoothing, ...
* width/height arguments for movie export (mpng, movie.produce)
* fetch: support "fetch EMD-3489"
* auto_show_classified -1 => 3 for 500k+ atoms
* pick_shading => surface_color_smoothing off
* cleanup: eliminate pymol.pymol_launch variable
2017-01-19 15:45:50 +00:00
Thomas Holder
c2731f62ef molfile plugins, fetch URLs, ...
* update molfile plugins to VMD version 1.9.3
* fetch 2fofc/fofc: update URLs, EDS will retire in 2017
* fix sf#102 pseudoatom multi-state problem
* editor.attach_amino_acid: fix PRO/N geometry
2016-12-14 19:07:39 +00:00
Thomas Holder
2930efa152 1.8.5.0 (unstable/experimental)
* avoid selection keyword name conflicts, append underscore
* load: allow format=plugin (by extension) and format=plugin:PLUGIN (with PLUGIN being a molfile plugin identifier)
* load format "vdb": VIPERdb PDB variant with retain_order=1
* load/load_traj: guess trajectory object
* fetch
    * new setting "fetch_type_default"
    * type=mmtf: fetch MMTF format
    * type=2fofc/fofc: get spacegroup from PDBe API
    * update download URLs
* new setting: editor_auto_measure
* new default: ray_transparency_oblique_power=4.0
* "update" command: support "current state" (-1)
* alter elem -> update protons and vdw
* don't allow "import cmd" (corrupts PyMOL namespace)
* support "python -m pymol" to launch PyMOL
2016-12-05 19:04:04 +00:00