• RE: Setting Van der Waals Distance

    Hi,

    I'm afraid the API cannot change the Van der Waals radius of elements. 

    You may be able to calculate something approaching a  packing coefficient from the Grid class in utilities, by constructing a grid large enough to contain your crystal, populating it using Grid.set_sphere() then counting the non-zero values with Grid.count_grid().  This would not be a genuine packing coefficient since the Grid class is orhonormal, so you may need to do some normalisation of the resulting coefficient with respect to the unit cell volume and the Grid volume.  If your purpose is to compare packing coeffients of structures this pseudo-packing-coefficient may be useful.

    Best wishes
    Richard

     

  • RE: Altering crystal structures

    Dear Toms,

    the expression 'entry.molecule' will fetch a fresh copy of the molecule from the entry every time which is why you are not seeing any changes to the molecule.  Instead you should do something like:

    crystal = entry.crystal
    original_molecule = crystal.molecule
    new_molecule = molecule.Molecule(original_molecule.identifier)
    for component in original_molecule.components:
        # Do your editing on this component
        new_molecule.add_molecule(component)
    crystal.molecule = new_molecule

    Hope this helps.  If anything is unclear, please get back to me.
    Best wishes
    Richard

  • RE: Setting Van der Waals Distance

    Hi,

    on second thoughts, you could replace those atoms in the crystal with a different atom type whose Van der Waals radius is more suitable.  For example,

    from ccdc import io
    csd = io.EntryReader('csd')
    crystal = csd.crystal('AABHTZ')
    print(crystal.packing_coefficient)

    mol = crystal.molecule
    for a in mol.atoms:
        if a.atomic_symbol == 'Cl':
            a.atomic_symbol = 'U'
    crystal.molecule = mol
    print(crystal.packing_coefficient)

    This increases the packing coefficient from 0.70 to 0.72.

    Would this work in your case?

    Best wishes
    Richard

  • RE: Setting Van der Waals Distance

    Hi,

    I'm afraid this is not possible in the API.

    Best wishes

    Richard

  • RE: how to change HbondCoordination settings?

    Hi,

    the settings for a HBondCoordination calculation contains a configurable HBondCriterion class which can be changed to suit your purpose.

    from ccdc.descriptors import CrystalDescriptors
    hbond_coordination = CrystalDescriptors.HBondCoordination()
    hbond_coordination.settings.hbond_criterion.distance_range = (-5, 0.5)
    hbond_coordination.settings.hbond_criterion.vdw_corrected = True

    Documentation of the HBondCriterion class may be found here:

    https://downloads.ccdc.cam.ac.uk/documentation/API/descriptive_docs/molecule.html#hbond-criterion

    Best wishes
    Richard

  • RE: Detecting rigidity or flexibility of set of molecules

    Hi Tara,

    I'm afraid I don't know of any other way of calculating a rigidity parameter for a molecule.

    Best wishes
    Richard

  • RE: Detecting rigidity or flexibility of set of molecules

    Hi Tara,

    one easy measure would be the proportion of rotatable bonds in the structure:

    from ccdc import io

    csd = io.EntryReader('csd')

    for i, e in enumerate(csd):
        if e.molecule.bonds:
            m = e.molecule
            print(e.identifier, round(len([b for b in m.bonds if b.is_rotatable])/float(len(m.bonds)), 2))
        if i >= 20:
            break

    (u'AABHTZ', 0.22)
    (u'AACANI10', 0.02)
    (u'AACANI11', 0.02)
    (u'AACFAZ', 0.18)
    (u'AACFAZ10', 0.18)
    (u'AACMAL', 0.29)
    (u'AACMHX10', 0.11)
    (u'AACRHA', 0.08)
    (u'AACRHC', 0.14)
    (u'AACRUB', 0.14)
    (u'AACRUB01', 0.14)
    (u'AADAMC', 0.09)
    (u'AADMPY', 0.11)
    (u'AADMPY10', 0.11)
    (u'AADRIB', 0.3)
    (u'AAGAGG10', 0.05)
    (u'AAGGAG10', 0.06)
    (u'AALCFE', 0.2)
    (u'AALPRO', 0.17)
    (u'AAMAND', 0.1)
    (u'AAMTCO', 0.22)

    Would this suit your purpose or would you need something more complicated?

    Best wishes
    Richard

  • RE: Central Group Library problems

    Hi Claire,

    I think you're right about MEHNIY: looking at the central group definitions for the sulphur-containing rings:

    http://isostar.ccdc.cam.ac.uk/html/classes/Ligand_Ring_systems_S_containing.html

    None of them contain two sulphur atoms.

    The other ring system doesn't seem to match any of these central groups:

    http://isostar.ccdc.cam.ac.uk/html/classes/Ligand_Ring_systems_C_H_only.html

    Best wishes
    Richard

  • RE: Central Group Library problems

    Hi Claire,

    I think the problem here is that XELFEC02 has deuterium instead of hydrogen and the InteractionLibrary does not recognise the deuteriums.

    print(csd.molecule('XELFEC').atoms)

    [Atom(P1), Atom(O1), Atom(O2), Atom(H1), Atom(O3), Atom(H2), Atom(O4), Atom(H3)]

     

    print(csd.molecule('XELFEC02').atoms)

    [Atom(P1), Atom(O1), Atom(O2), Atom(O3), Atom(O4), Atom(D1), Atom(D2), Atom(D3)]

    Best wishes
    Richard

  • RE: H-bond calculation in python API

    You are very welcome.  Please get back to me if there is anything else you would like to know.

    Best wishes
    Richard