75 Commits

Author SHA1 Message Date
Jarrett Johnson
9c82294fab PYMOL-4014 Respect quiet argument for cif load 2024-01-30 12:06:24 -05:00
Jarrett Johnson
07d7a790f0 Forward decls/Move headers to source 2021-08-20 11:24:10 -04:00
Jarrett Johnson
355c45d229 Place CObject in pymol namespace 2021-02-11 19:14:06 +01:00
Thomas Holder
1142e3ab22 PYMOL-3570 Bonds to crystal symmetry mates 2021-02-11 18:58:26 +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
68a18a3e09 CoordSet refactoring/cleanup
- Remove unused CoordSet::appendIndices()
- Simplify ObjectMoleculeDummyNew
- Simplify ObjectMoleculeSort
- Turn atom_state_setting_id into a method
- Consolidate CoordSetAdjustAtmIdx and CoordSetPurge
- Convert IdxToAtm and AtmToIdx to std::vector
- Eliminate CoordSet::NAtIndex
- Use setNIndex() where possible
2021-01-14 14:15:44 +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
79a0fb4093 mmCIF import: _atom_site.pymol_{label,vdw,...}
Add some custom PyMOL atom site columns, matching "iterate" variables:

_atom_site.pymol_label
_atom_site.pymol_vdw
_atom_site.pymol_elec_radius
_atom_site.pymol_partial_charge
2020-11-11 16:53:30 +01:00
Thomas Holder
ea75c8e839 Improve CIF file error handling (PYMOL-3501)
Send CIF parser errors either to the feedback mechanism (warning level),
or return pymol::Error().
2020-08-04 14:02:34 +02:00
Vedran Miletić
361a407727 Removed "using namespace std;" in layer[012] files 2020-06-26 13:19:39 +02:00
Thomas Holder
0004b2ddf7 PYMOL-3470 connect_mode=4 ignore conflicting alt ids
Regression of 6f922245290a (PYMOL-3318)
2020-06-02 10:51:59 +02:00
Thomas Holder
70f0c60352 cleanup: compiler warnings 2020-02-26 19:18:14 +01:00
Thomas Holder
b9ab4b4e99 cif missing residue loading: skip insertions
Observed with 5WLC chain ST
2019-12-09 17:35:10 +01:00
Thomas Holder
4cca868cab connect_mode=4 inter-residue w/ alt codes 2019-11-27 14:45:22 +01:00
Thomas Holder
94f761d27c PYMOL-3318 _chem_comp_atom.alt_atom_id
with connect_mode=4
2019-11-27 14:45:18 +01:00
Thomas Holder
b57f131940 -Wunused-variable 2019-11-27 13:18:08 +01:00
Thomas Holder
75f06a974e CObject function pointers -> virtual methods 2019-10-29 16:24:12 +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
478902fbc1 Converted CSet from C vla to C++ vla 2019-08-30 17:16:24 +02:00
Nandini Naidu
71f77b68ab Converted BondType Bond to a c vla 2019-08-30 17:12:59 +02:00
Nandini Naidu
79a6b1af5e changed AtmtoIdx and TmpBond to C++ vla's 2019-08-19 22:00:58 +02:00
Nandini Naidu
1d8d6c861a float Coord and int IdxtoAtm changed to C++ vlas 2019-08-13 17:06:49 +02:00
Thomas Holder
63957468cb coreCIF: _atom_site_label symbol fallback 2019-08-13 16:21:43 +02:00
Thomas Holder
97278dc13e CIF atom types: ignore oxidation state 2019-08-13 16:21:28 +02:00
Nandini Naidu
1b017594ae symmetry class changes to make deep copyable 2019-08-13 16:20:41 +02:00
Thomas Holder
f2f3dbb746 refactor CIF parser
- put in "pymol" namespace
- modernize memory management (C++11)
- make cif_array API more STL like (get_nrow() -> size(),
  row -> pos, etc.)
- as<> and to_vector<> with default
- cif_file::datablocks() preserves order (map -> vector)
2019-06-07 16:23:55 +02:00
Thomas Holder
55135c8d04 pymol::zstring_view 2019-06-07 16:22:08 +02:00
Jarrett Johnson
37f95ef227 ObjectMolecule proper C++ inheritance 2019-03-29 13:04:12 +01:00
Thomas Holder
97d166a858 clang-tidy modernize-use-nullptr
... and modernize-use-bool-literals for some "newer" files.
2019-01-18 10:04:10 +01:00
Thomas Holder
0dcfcc8344 clang-tidy modernize-loop-convert 2019-01-18 10:03:28 +01:00
Thomas Holder
286cad570b remove unused read_pdbx_poly_seq_scheme 2019-01-18 10:02:52 +01:00
Thomas Holder
3129be199e refactor: lexborrow_t 2018-11-15 16:27:43 +01:00
Thomas Holder
1eab612a45 refactor: lexidx_t -> const lexidx_t&
pave the way for a non-primitive lexidx_t
2018-11-15 16:09:44 +01:00
Thomas Holder
0a856e722f lexidx_t: use LexBorrow 2018-11-15 16:08:41 +01:00
Thomas Holder
0f6cb2d5f3 C++11: myarray -> std::array 2018-09-25 12:03:29 +02:00
Thomas Holder
33937d8543 setup.py: drop --no-cxx11 option 2018-09-03 15:27:33 +02:00
Thomas Holder
a7f4c23a50 fix connect_mode=4 heap-buffer-overflow 2018-06-22 19:21:47 -04: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
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
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
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
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
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
9686cfea0e 1.8.1.2 2016-03-21 21:20:36 +00:00
Thomas Holder
b5852c0ebf auto_show_classified, auto-detect CA-only models
* new setting: auto_show_classified
* cartoon/ribbon: auto-detect CA-only models
2016-03-03 18:40:23 +00:00
Thomas Holder
40bc132214 fix selection macros, better "missing residues" support with mmCIF
- fix selection macros with wildcards and colon (:) residue ranges (1.8.0 regression)
- mmCIF: load missing residues independent of cif_use_auth setting
2016-03-02 22:56:26 +00:00
Thomas Holder
936200b7f5 fix pdb_insure_orthogonal for multi-model PDBs 2016-02-24 05:52:08 +00:00