41 Commits

Author SHA1 Message Date
Jarrett Johnson
fbfda4a257 Replace NULL with nullptr 2024-05-20 09:07:33 -04:00
Jarrett Johnson
fceae6fe66 PlugIOManager: use vector over VLA 2021-08-20 11:45:09 -04:00
Thomas Holder
ba78bd90e8 PYMOL-3595 smooth cutoff
- Add a cutoff argument to the smooth command
2021-03-26 13:53:01 +01:00
Thomas Holder
166cc72c10 auto_defer_builds: Use mode 3, support load_traj
- Support `auto_defer_builds` setting with `load_traj` command
- Switch to `defer_builds_mode` 3 instead of 1

PYMOL-3596
2021-02-11 19:14:53 +01: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
f84389f14f Refactor CCrystal and CSymmetry
- Make members private
- Add getters and setters
- Remove CrystalUpdate, SymmetryUpdate, SymmetryFree
- Remove unused CCrystal members (Norm, RecipDim, UnitCellVolume)
- Add CCrystal unit test
2020-12-11 13:57:26 +01:00
Thomas Holder
15b74a6062 Refactor: Remove fFree methods
Also remove unused members:
- GadgetSet::P
- GadgetSet::Setting
2020-10-16 11:14:05 +02:00
Thomas Holder
86cc1dafa8 Fix --no-vmd-plugins 2020-10-05 15:46:22 +02:00
Jarrett Johnson
ce2dc5dd59 move logic from CmdLoadTraj to ExecutiveLoadTraj 2020-09-03 09:39:27 +02:00
Thomas Holder
d91a233218 PYMOL-3216 per-state symmetry and cell
- Added CoordSet::UnitCellCGO
- Removed ObjectMolecule::UnitCellCGO
- Finally implemented the `state` argument for
  - ObjectMolecule::getSymmetry
  - ObjectMolecule::setSymmetry
- Per-state symmetry loading in PlugIOManager

Closes #114
2020-07-15 18:06:20 +02:00
Jarrett Johnson
aae0b18a0f refactor ObjectMapState 2020-02-20 12:29:45 +01:00
Thomas Holder
4948dd0fd4 use pdb_literal_names with PlugIOManagerLoadMol
Fixes polymer detection with "prmtop" extension.
2019-12-10 10:53:00 +01:00
Thomas Holder
6d6016254c fix #44 load_traj selection for xtc format 2019-12-03 12:58:23 +01:00
Jarrett Johnson
14e5cefb94 ObjectMesh refactor 2019-11-27 13:30:40 +01:00
Thomas Holder
bd75bae392 cube map import: handle inverted volumes
follow-up for #59
2019-10-29 16:29:38 +01:00
Thomas Holder
75f06a974e CObject function pointers -> virtual methods 2019-10-29 16:24:12 +01:00
Thomas Holder
678eae1bdf load ..., format=plugin:<type>:<mask> 2019-10-29 16:07:59 +01:00
Thomas Holder
4f50d7568a eliminate pymol::vla non-const legacy VLA cast
Avoid assignment of pymol::vla<T> return values to T*.

Refactoring to facilitate this:
- const-correctness (const T* cast still works)
- .data()
- T* -> pymol::vla<T> function arguments
2019-09-23 15:56:55 +02:00
Jarrett Johnson
00473b5656 C++ inheritance for Object classes 2019-09-04 18:18:01 +02:00
Nandini Naidu
71f77b68ab Converted BondType Bond to a c vla 2019-08-30 17:12:59 +02:00
Nandini Naidu
3eea34803e changed Symmetry and PeriodicBox to unique pointers and changes other pointers to c++ vla's 2019-08-30 10:22:08 +02:00
Nandini Naidu
1d8d6c861a float Coord and int IdxtoAtm changed to C++ vlas 2019-08-13 17:06:49 +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
1b017594ae symmetry class changes to make deep copyable 2019-08-13 16:20:41 +02:00
Thomas Holder
035d6fe611 C++ inheritance for all CObject subclasses 2019-03-29 13:36:14 +01: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
f19722c807 PYMOL-3100 map loading: no matrix for aligned axes
This re-introduces some old code from dafdc053ce7cbe37ffd2e4cec07406f8f27279f5
for the special case of aligned map axes from cube (and other) maps.
2018-08-16 19:17:27 +02: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
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
680f313001 cartoon_trace_atoms for sheets, fast connect_mode=4 2015-08-31 02:08:17 +00:00
Thomas Holder
59d84a385b assembly fix, ref count fix, ...
* fix assemblies for cases like 4f3r which have multiple entries in the _pdbx_struct_assembly_gen table
* fix ref counts in iterate/alter subscripts
* improve side_chain_helper and nucleic_adic_mode situation
* eliminate all "try/catch" blocks for std::map lookups
* clean up some MemoryDebug stuff and remove unused jenarix wrapper
2015-06-23 14:07:26 +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
a5cd42bfae VASP file support, fix memory leaks
- VASP file support for: CHGCAR, OUTCAR, POSCAR, XDATCAR
- psf file support
- fix several memory leaks
2015-04-28 21:56:42 +00:00
Thomas Holder
5cbfe6b0d4 fix invalid memory access during PyMOL_Stop
- https://sourceforge.net/p/pymol/bugs/162/
  - Free ShaderMgr after Scene
  - check (G != NULL) in MainOnExit
- https://sourceforge.net/p/pymol/bugs/161/
  apply clang logical-op-parentheses suggestion
- more `const char *` arguments refactoring
2015-03-16 18:58:36 +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
425cf86a0b elimination of more compiler warnings
Includes https://sourceforge.net/p/pymol/patches/8/
2014-12-12 20:02:42 +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