47 Commits

Author SHA1 Message Date
Jarrett Johnson
3248445fcf Replace Scene matrices with glm::mat4 2025-01-04 12:33:44 -05:00
Jarrett Johnson
b52b6f2174 Port code changes from incentive (06/2023) 2025-01-04 12:09:32 -05: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
Jarrett Johnson
6bfc590446 PYMOL-4025 ObjectCurve 2024-01-30 15:30:40 -05:00
Jarrett Johnson
eea082966b Remove orthoCGO defines; fix warnings 2022-03-08 15:31:11 -05:00
Jarrett Johnson
bacc3256d5 TTT Rework 2022-02-22 15:34:44 -05:00
Jarrett Johnson
07d7a790f0 Forward decls/Move headers to source 2021-08-20 11:24:10 -04:00
Jarrett Johnson
b184f73cce RenderContext enum class 2021-04-28 05:13:30 -04:00
Jarrett Johnson
355c45d229 Place CObject in pymol namespace 2021-02-11 19:14:06 +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
a686d16fc7 Cleanup: SymmetryAttemptGeneration, ObjectStateGetMatrix
- ObjectStateGetMatrix const-correctness
- Make SymmetryAttemptGeneration "private" and call it from getNSymMat()
- match_info: Silence -Wnon-c-typedef-for-linkage warning
2020-12-03 18:15:45 +01:00
Thomas Holder
3bc6158376 Some const-correctness 2020-12-03 18:10:46 +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
Thomas Holder
8b9efcc028 refactor: use more pymol::Result 2020-04-23 14:11:17 +02:00
Thomas Holder
737cd4f65f CObject::getCurrentState refactoring
fixes:
PYMOL-3388
PYMOL-3390
PYMOL-3391
2020-03-13 09:09:38 +01:00
Thomas Holder
75f06a974e CObject function pointers -> virtual methods 2019-10-29 16:24:12 +01:00
Thomas Holder
698d3cebff refactor pymol.querying
- use with _self.lockcm: pattern
- use API_SETUP_ARGS and related patterns
- use APIEnter instead of APIEnterNotModal
- propagate errors as much as possible (using pymol::Error or PyErr_XXX)
- add doxygen-style documentation for C++ functions
2019-10-15 13:54:54 +02:00
Jarrett Johnson
00473b5656 C++ inheritance for Object classes 2019-09-04 18:18:01 +02:00
Thomas Holder
27014c9e93 OOAlloc malloc -> new 2019-08-13 17:08:59 +02:00
Nandini Naidu
7dc7091a40 Converted C VLAs to C++ VLAs, managed combination C and C++ memmory allocation issues. 2019-08-13 16:33:10 +02:00
Nandini Naidu
7e748a302e Refactor viewElem 2019-08-13 16:00:05 +02:00
Nandini Naidu
2d7d280b79 Refactor crystal class 2019-08-13 15:59:25 +02:00
Jarrett Johnson
353f5a8452 Const-correctness for Matrix functions 2019-05-02 18:02:26 +02:00
Thomas Holder
e2206feb68 ObjectMakeValidName: Useful warnings
- polymer/nucleic: warn only once (closes #21)
- warn when replacing invalid characters (#22)
2019-02-21 18:41:04 +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
46b52c0a5f define -> enum: cObject_t, cLoadType_t 2018-11-15 16:32:40 +01:00
Thomas Holder
4f3c781a74 cleanup: compiler warnings
-Wdangling-else
-Wmisleading-indentation
-Wmismatched-tags
-Wparentheses
-Wsometimes-uninitialized
-Wunused-but-set-variable
-Wunused-function
-Wunused-label
-Wunused-variable
2018-08-16 19:00:17 +02:00
Thomas Holder
f21c61958e Graphics refactoring, ported from Incentive PyMOL 2018-07-03 20:19:12 +02:00
Thomas Holder
5faa72b373 call SceneObjectDel in ObjectPurge
Some object types did not call SceneObjectDel (e.g. ObjectGroup) which
could cause segmentation fault in ExecutiveFree
2018-06-19 17:29:02 -04:00
Thomas Holder
e2df29a2ee polymer.protein polymer.nucleic multifilesave ...
* new selection keywords: polymer.protein polymer.nucleic
* new command: multifilesave
* MMTF export (requires simplemmtf python module)
* select: present, state -1 -> current object state
* create: source_state = -1 -> current
  (was: source_state = -1/0 -> all)
* cif: support quoted '?' and '.' as values
  cif_get_array -> None instead of empty string for ? and .
* fix copy discrete object w/o coords
* fix loading pdbqr AutoDock 4 atom types
* fix get_model('none') and get_str('mol', 'none')
* h_add refactored: 5x faster, support discrete objects
2018-02-07 15:44:17 +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
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
Thomas Holder
999ceebbe8 1.8.3.2
* experimental MMTF load support
* map export in CCP4 format
* SDF V3000 import/export support
* refactor molecular file formats export: Unified handling of PDB, PQR, mmCIF, MOL2, SDF, XYZ, MAE
* PLY geometry import (as CGO)
* new command: unset_deep
* new setting: cartoon_all_alt: Create cartoon for every alt code
* stick_h_scale: default=1.0 (was: 0.4) but remove dependency on negative stick_radius
* auto_show_classified: Visualize small (< 50 atoms) polymer classified molecules like organic
* bymol selection operator: ignore zero-order bonds
* menu: isomesh/surface negative color
* improve alignment of residues with unknown resn (e.g. ligands):
  give a match score of 5 to perfect matches of unknown residue codes.
  Previously, those got match score -1.
* remove broken and obsolete "PMO" file support
* use "label_digits" setting with "label" command
* do not resize window when loading a session file
* fix ignored SCALE w/ identity rotation (e.g. 1WAP)
* fix "scene auto, clear" (Scene > Delete)
* new setting: pick_shading: do flat shading for programmable image color analysis
* experimental cmd.raw_image_callback: post cmd.draw() callback
2016-08-30 19:14:39 +00:00
Thomas Holder
d0d46b9a42 PyMOL 1.8.2.0
- fix/silence various compiler warnings
- partly fixes sf#177, sf#178
- fix crash when loading PSE with bg_image_filename
2016-04-19 22:02:24 +00:00
Thomas Holder
b3472cbace ignore_case_chain, cartoon_gap_cutoff, ...
* restore ignore_case=on default
* new setting: ignore_case_chain (default off)
* new setting: cartoon_gap_cutoff
* increase PYMOL_MAX_THREADS
* amber topology loading: bond order 1 for all bonds
* improve MOL2 file handling
* new grid_mode=3: grid per object-state
2016-02-08 15:59:56 +00:00
Thomas Holder
9f53f30e47 segi, resn, name of arbitrary length; settings in iterate/alter
* support segi, resn and name of arbitrary string length
* expose settings to iterate/alter via "s.<name>"
* Python 3 compatibility for champ module
* apbs_tools: apply fixes from Pymol-script-repo
2015-12-14 19:11:12 +00:00
Thomas Holder
a9b686ad77 color autocomplete for ramps, improve volume blending 2015-10-29 12:10:08 +00:00
Thomas Holder
49410f0ac1 mmcif: match pdb1, pdb2, ... files with assembly generation
- fix handling of _pdbx_struct_assembly_gen with repeated asym_id
- create assembly for multi-state objects
- no pdb_insure_orthogonal for assemblies

Also:
- fix "File > Run"
- some "const correctness" refactoring
- experimental pymol.querying.get_object_ttt
2015-07-02 21:04:32 +00:00
Thomas Holder
82c677e8c9 1.7.7.1 (unstable/experimental)
* change default (!) of "ignore_case" setting to off. Case insensitve
  identifier matching is not practical anymore with large structures
  which use upper and lower case chain identifiers.

* new setting "assembly" to load assemblies from mmCIF as multi-state
  objects with all_states=1

* new setting "cif_use_auth" controls whether mmCIF "auth" identifiers
  are used or not (on by default)

* mmCIF "CA/P ATOMS ONLY" chains: set atom-level cartoon_trace_atoms
  and ribbon_trace_atoms

* CIF discrete and irregular multi-model loading support

* support "pdb_honor_model_number" setting for CIF

* load multiple objects ("data_" blocks) from one CIF file (multiplex=-1)

* don't store AtmToIdx, DiscreteAtmToIdx or DiscreteCSet to PSE
  (unless pse_export_version <= 1.76)
2015-05-20 18:26:53 +00:00
Thomas Holder
dad194ad0f Restore scenes "disable" recall behavior...
- scenes: Restore the old behavior that when recalling a scene, all objects
  which were not present when storing the scene are disabled.
- fix auto-complete for filenames with spaces
- fix an object menu panel group ordering problem

Refactoring:
- remove unused variables (Partly applies https://sourceforge.net/p/pymol/bugs/166/)
- lots of: char* -> const char*
- remove inline Parse functions, simplify ParseFloat3List
- make functions static
2015-04-09 21:35:38 +00:00
Thomas Holder
22fdfe3e81 fixed roving detail/density demos, removed unused code
* fixed roving density and roving detail demos (regression from last commit)
  http://sourceforge.net/p/pymol/bugs/156
* fix "narrowing conversion" C++ errors
* removed unused code and preprocessors:
  _PYMOL_GL_DRAWARRAYS
  _PYMOL_GL_CALLLISTS
  _PYMOL_CGO_DRAWARRAYS
  _PYMOL_CGO_DRAWBUFFERS
  OPENGL_ES_1 
  OPENGL_ES_2
* removed deprecated "register" specifier
2015-03-13 22:19:47 +00:00
Thomas Holder
9bb5c2d971 1.7.5.0 (unstable/experimental)
* mmCIF _atom_sites.fract_transf support (SCALEn equivalent)
* Complete port of scenes to C++
* warn user if setting a setting on the wrong level
* cmd.extendaa: shortcut for cmd.extend with argument auto-completion
* reduced memory footprint of AtomInfoType
* expose "reps" to iterate/alter
* expose "protons" to iterate/alter
* adaptive cartoon quality and sampling, depending on number of atoms
* fix ring center color with cartoon_ring_color=default
* make SelectorGetTmp strictly molecular, fixes for example "dss" with group names
* fix "copy" can cause crash
* fix "custom" selection operator
* consider spec_count in shaders
* don't invalidate shaders for lighting settings
* don't disable shaders for all Intel chips
* don't touch sphere_mode when disabling shaders
* map_new buffer == -1 -> gaussian_resolution
* fix all_states picking
* remove cylinder_shader_ff_workaround and cylinders_shader_filter_faces
* remove unused gl_ambient setting
* fix Tcl/Tk menu settings logging
* fix: grid mode scales down label size incorrectly
* fix: no animate argument for cmd.origin
* fix side_chain_helper for hetatm polymer atoms
* fix .mmd export
* refactor many function to take "const" pointer arguments
2015-03-12 17:44:19 +00:00
Thomas Holder
e274a46085 fast CIF loading, 1.7.3.1 (unstable/experimental)
* fast PDBx/mmCIF and core CIF loading in C++
* new connect_mode=4 does bonding with components.cif dictionary
  (mmCIF only, components.cif needs to be present in current
  directory)
* gray out residues in the sequence viewer that are missing from the
  current state; Read missing residues from mmCIF files
  (_pdbx_unobs_or_zero_occ_residues records) so that they show up in
  the sequence viewer
* add spider map reading support
* load "map" as ccp4 instead of throwing "ambiguous" error
* xyz write support
* Improve right-button zoom: use origin instead of clipping slab
  center as depth indicator, fixes zoom speed when far clipping plane
  is very far away
* don't use dynamic_width for nonbonded rep
2014-10-16 20:14:27 +00:00
Thomas Holder
f42840260b c++ for all PyMOL c files
- renaming files c -> cpp
- c++ specific syntax (::)
2014-09-08 13:42:11 +00:00