Code Monkey home page Code Monkey logo

Comments (5)

rvianello avatar rvianello commented on July 24, 2024

from django-rdkit.

paconius avatar paconius commented on July 24, 2024

Ah, okay. I thought it was a database-level setting; but instead it is a connection-level setting that resets with each new connection. I'll pursue your suggestion. Thank you.

from django-rdkit.

byte-for-byte avatar byte-for-byte commented on July 24, 2024

Hi paconius,
I have the same problem. Did you solve this back then?

from django-rdkit.

paconius avatar paconius commented on July 24, 2024

Hi paconius, I have the same problem. Did you solve this back then?

I was new to Django when @rvianello recommended using signals to force chiral_sss for each new database connection. As a result I was never able to make it work within the Django project. I ended up solving it by permanently setting the flag in the Postgres database itself. If you set the variable in the postgresql config file, then chiral matching will always be enabled and you don't need to mess with anything in the python/Django code to make it work correctly.

cat << EOF >> $PGDATA/postgresql.conf
rdkit.do_chiral_sss = true #this turns on chiral substructure searching
EOF

from django-rdkit.

byte-for-byte avatar byte-for-byte commented on July 24, 2024

ok thanks. that is a possibility I will explore. Not sure if the users would like to switch to do_chiral_sss=False from time to time...

Well, I was surprised that this tutorial https://github.com/rdkit/django-rdkit/blob/master/docs/tutorial.rst describes how to set the flag, but it is either giving me the error you got or it is silently doing nothing, depending where I set the config flag.
Setting the flag directly in the database through psql works as you indicated (set rdkit.do_chiral_sss=true).

thanks for your help!
:)

from django-rdkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.